1
0
mirror of https://github.com/kairos-io/helm-charts.git synced 2025-05-14 19:32:14 +00:00
helm-charts/charts/osbuilder/templates/deployment.yaml
Dimitris Karakasilis 00da2c7cf3
Use a unique name for the nginx Deployment
because the currently used one was also used for the osbuilder
controller Deployment

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2022-12-19 17:25:24 +02:00

127 lines
4.6 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: '{{ include "helm-chart.fullname" . }}'
namespace: '{{.Release.Namespace}}'
labels:
{{- include "helm-chart.labels" . | nindent 8 }}
spec:
replicas: 1
selector:
matchLabels:
{{- include "helm-chart.selectorLabels" . | nindent 10 }}
template:
metadata:
annotations:
{{- range keys .Values.podAnnotations }}
{{ . | quote }}: {{ get $.Values.podAnnotations . | quote}}
{{- end }}
labels:
{{- include "helm-chart.selectorLabels" . | nindent 14}}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 14 }}
{{- end }}
containers:
- args:
- --secure-listen-address=0.0.0.0:8443
- --upstream=http://127.0.0.1:8080/
- --logtostderr=true
- --v=0
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.11.0
name: kube-rbac-proxy
ports:
- containerPort: 8443
name: https
protocol: TCP
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 5m
memory: 64Mi
securityContext:
allowPrivilegeEscalation: false
- args:
- --health-probe-bind-address=:8081
- --metrics-bind-address=127.0.0.1:8080
- --leader-elect
- --tool-image={{ .Values.image.repository | default "quay.io/kairos/osbuilder-tools" }}:{{ .Values.image.tag | default .Chart.AppVersion }}
- --serve-image={{ .Values.image.serving | default "nginx" }}
- --copy-to-namespace={{ .Release.Namespace }}
- --copy-role=osartifactbuilder-operator-artifactCopier
- --copy-to-pod-label=app.kubernetes.io/name=osbuilder-nginx
- --copy-to-path="/usr/share/nginx/html"
command:
- /manager
image: '{{ .Values.image.repository | default "quay.io/kairos/osbuilder" }}:{{ .Values.image.tag | default .Chart.AppVersion }}'
livenessProbe:
httpGet:
path: /healthz
port: 8081
initialDelaySeconds: 15
periodSeconds: 20
name: manager
readinessProbe:
httpGet:
path: /readyz
port: 8081
initialDelaySeconds: 5
periodSeconds: 10
{{- if and .Values.resources .Values.resources.controller }}
resources:
{{ toYaml .Values.resources.controller | indent 20 }}
{{- end }}
securityContext:
allowPrivilegeEscalation: false
securityContext:
runAsNonRoot: true
serviceAccountName: '{{ include "helm-chart.serviceAccountName" . }}'
terminationGracePeriodSeconds: 10
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 14 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 14 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 14 }}
{{- end }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/name: osbuilder-nginx
name: 'osbuilder-nginx'
namespace: '{{.Release.Namespace}}'
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: osbuilder-nginx
template:
metadata:
labels:
app.kubernetes.io/name: osbuilder-nginx
spec:
containers:
- image: nginx
name: nginx
ports:
- containerPort: 80
volumeMounts:
- mountPath: /usr/share/nginx/html
name: nginx-public
serviceAccountName: '{{ include "helm-chart.serviceAccountName" . }}'
terminationGracePeriodSeconds: 10
volumes:
- name: nginx-public
persistentVolumeClaim:
claimName: osartifactbuilder-operator-nginx-public