Deploy user-engine flex-auth policy service
This commit is contained in:
parent
29ae3e70c6
commit
0165ac8d14
3 changed files with 50 additions and 0 deletions
|
|
@ -32,6 +32,32 @@ kind: Service
|
|||
metadata: {name: flex-auth-tenant-engine, namespace: flex-auth}
|
||||
spec: {selector: {app.kubernetes.io/name: flex-auth-tenant-engine}, ports: [{name: http, port: 8080, targetPort: http}]}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata: {name: flex-auth-user-engine, namespace: flex-auth}
|
||||
spec:
|
||||
replicas: 1
|
||||
selector: {matchLabels: {app.kubernetes.io/name: flex-auth-user-engine}}
|
||||
template:
|
||||
metadata: {labels: {app.kubernetes.io/name: flex-auth-user-engine}}
|
||||
spec:
|
||||
automountServiceAccountToken: false
|
||||
securityContext: {runAsNonRoot: true, seccompProfile: {type: RuntimeDefault}}
|
||||
containers:
|
||||
- name: flex-auth
|
||||
image: forgejo.coulomb.social/coulomb/flex-auth@sha256:a31961c45215aa6baf3bc748c6741ab703c2c8325e61aa7983a355026195e51b
|
||||
args: ["serve", "--addr", "0.0.0.0:8080", "--registry", "/opt/flex-auth/examples/user-engine/registry_snapshot.json", "--policy", "/opt/flex-auth/examples/user-engine/policy_package.md"]
|
||||
ports: [{name: http, containerPort: 8080}]
|
||||
securityContext: {allowPrivilegeEscalation: false, capabilities: {drop: ["ALL"]}, readOnlyRootFilesystem: true}
|
||||
resources: {requests: {cpu: 25m, memory: 32Mi}, limits: {cpu: 300m, memory: 192Mi}}
|
||||
readinessProbe: {httpGet: {path: /healthz, port: http}, periodSeconds: 5}
|
||||
livenessProbe: {httpGet: {path: /healthz, port: http}, periodSeconds: 20}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata: {name: flex-auth-user-engine, namespace: flex-auth}
|
||||
spec: {selector: {app.kubernetes.io/name: flex-auth-user-engine}, ports: [{name: http, port: 8080, targetPort: http}]}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata: {name: tenant-engine-data, namespace: tenant-engine}
|
||||
|
|
@ -83,6 +109,19 @@ spec:
|
|||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata: {name: flex-auth-user-engine, namespace: flex-auth}
|
||||
spec:
|
||||
podSelector: {matchLabels: {app.kubernetes.io/name: flex-auth-user-engine}}
|
||||
policyTypes: [Ingress, Egress]
|
||||
ingress:
|
||||
- from:
|
||||
- namespaceSelector: {matchLabels: {kubernetes.io/metadata.name: user-engine}}
|
||||
podSelector: {matchLabels: {app.kubernetes.io/name: user-engine}}
|
||||
ports: [{protocol: TCP, port: 8080}]
|
||||
egress: []
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata: {name: tenant-engine, namespace: tenant-engine}
|
||||
spec:
|
||||
podSelector: {matchLabels: {app.kubernetes.io/name: tenant-engine}}
|
||||
|
|
|
|||
|
|
@ -135,6 +135,12 @@ spec:
|
|||
podSelector:
|
||||
matchLabels: {app.kubernetes.io/name: tenant-engine}
|
||||
ports: [{protocol: TCP, port: 8090}]
|
||||
- to:
|
||||
- namespaceSelector:
|
||||
matchLabels: {kubernetes.io/metadata.name: flex-auth}
|
||||
podSelector:
|
||||
matchLabels: {app.kubernetes.io/name: flex-auth-user-engine}
|
||||
ports: [{protocol: TCP, port: 8080}]
|
||||
- to:
|
||||
- namespaceSelector:
|
||||
matchLabels: {kubernetes.io/metadata.name: kube-system}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue