quorate/vendor/workloads/forgejo-public/facade-code.yaml

140 lines
3.6 KiB
YAML
Raw Permalink Normal View History

apiVersion: v1
kind: ServiceAccount
metadata:
name: forge-code-facade
namespace: forgejo-public
automountServiceAccountToken: false
---
apiVersion: v1
kind: Service
metadata:
name: forge-code-facade
namespace: forgejo-public
labels:
app.kubernetes.io/name: envoy
app.kubernetes.io/instance: forge-code-facade
app.kubernetes.io/component: forge-code
spec:
selector:
app.kubernetes.io/name: envoy
app.kubernetes.io/instance: forge-code-facade
ports:
- name: http
port: 8080
targetPort: http
protocol: TCP
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: forge-code-facade
namespace: forgejo-public
labels:
app.kubernetes.io/name: envoy
app.kubernetes.io/instance: forge-code-facade
app.kubernetes.io/component: forge-code
spec:
replicas: 2
minReadySeconds: 5
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 0
maxSurge: 1
selector:
matchLabels:
app.kubernetes.io/name: envoy
app.kubernetes.io/instance: forge-code-facade
template:
metadata:
labels:
app.kubernetes.io/name: envoy
app.kubernetes.io/instance: forge-code-facade
app.kubernetes.io/component: forge-code
spec:
runtimeClassName: gvisor
serviceAccountName: forge-code-facade
automountServiceAccountToken: false
terminationGracePeriodSeconds: 30
securityContext:
runAsNonRoot: true
runAsUser: 65532
runAsGroup: 65532
fsGroup: 65532
seccompProfile:
type: RuntimeDefault
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
app.kubernetes.io/name: envoy
app.kubernetes.io/instance: forge-code-facade
containers:
- name: envoy
image: envoyproxy/envoy:v1.40.2@sha256:8de97e654644827d62afdbf7e1d3dc9fee01a8690d410dd1c63a30dc6b6cecbb
imagePullPolicy: IfNotPresent
args:
- -c
- /etc/envoy/envoy.yaml
ports:
- name: http
containerPort: 8080
protocol: TCP
- name: admin
containerPort: 9901
protocol: TCP
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
memory: 256Mi
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
startupProbe:
httpGet:
path: /ready
port: admin
failureThreshold: 30
periodSeconds: 2
readinessProbe:
httpGet:
path: /ready
port: admin
periodSeconds: 5
livenessProbe:
httpGet:
path: /ready
port: admin
failureThreshold: 3
periodSeconds: 10
volumeMounts:
- name: config
mountPath: /etc/envoy
readOnly: true
- name: tmp
mountPath: /tmp
volumes:
- name: config
configMap:
name: forge-code-facade-config
- name: tmp
emptyDir: {}
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: forge-code-facade
namespace: forgejo-public
spec:
minAvailable: 1
selector:
matchLabels:
app.kubernetes.io/name: envoy
app.kubernetes.io/instance: forge-code-facade