openstack-helm-infra/tiller/templates/deployment-tiller.yaml
Gage Hugo 1062d68eed Revert "chore(tiller): removes tiller chart"
This reverts commit b2adfeadd8.

Reason for revert: This breaks the kubeadm jobs, lets add this
back until a proper fix is implemented.

Change-Id: I9b93c86e3747f2e768956898a27dd6d63469a8ee
2021-08-20 16:08:44 +00:00

112 lines
3.5 KiB
YAML

{{/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if .Values.manifests.deployment_tiller }}
{{- $envAll := . }}
{{- $serviceAccountName := printf "%s-%s" .Release.Name "tiller" }}
{{ tuple $envAll "tiller" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ $serviceAccountName }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: {{ $serviceAccountName }}
namespace: {{ .Release.Namespace }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
labels:
app: helm
name: tiller
name: tiller-deploy
spec:
replicas: 1
selector:
matchLabels:
app: helm
name: tiller
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
labels:
app: helm
name: tiller
annotations:
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }}
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
spec:
{{ dict "envAll" $envAll "application" "tiller" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
initContainers:
{{ tuple $envAll "tiller" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers:
- env:
- name: TILLER_NAMESPACE
value: {{ .Release.Namespace }}
- name: TILLER_HISTORY_MAX
value: "0"
{{ tuple $envAll "tiller" | include "helm-toolkit.snippets.image" | indent 8 }}
livenessProbe:
failureThreshold: 3
httpGet:
path: /liveness
port: 44135
scheme: HTTP
initialDelaySeconds: 1
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
name: tiller
{{ dict "envAll" $envAll "application" "tiller" "container" "tiller" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 8 }}
ports:
- containerPort: 44134
name: tiller
protocol: TCP
- containerPort: 44135
name: metrics
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /readiness
port: 44135
scheme: HTTP
initialDelaySeconds: 1
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: {{ .Values.pod.dns_policy }}
restartPolicy: Always
schedulerName: default-scheduler
serviceAccount: {{ $serviceAccountName }}
serviceAccountName: {{ $serviceAccountName }}
terminationGracePeriodSeconds: 30
{{- end }}