generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
exclude openshift namespaces via regex
Signed-off-by: Zahar Pecherichny <[email protected]>
- Loading branch information
Showing
4 changed files
with
223 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,104 +1,107 @@ | ||
{{- if .Values.ha.enabled }} | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
control-plane: controller-manager | ||
name: {{ include "hnc.fullname" . }}-controller-manager-ha | ||
namespace: {{ include "hnc.namespace" . }} | ||
spec: | ||
replicas: 3 | ||
selector: | ||
matchLabels: | ||
control-plane: controller-manager-ha | ||
template: | ||
metadata: | ||
annotations: | ||
prometheus.io/scrape: "true" | ||
labels: | ||
control-plane: controller-manager-ha | ||
spec: | ||
containers: | ||
- args: | ||
{{- if .Values.hrq.enabled }} | ||
- --enable-hrq | ||
{{- end }} | ||
{{- range $hncExcludeNamespace := .Values.hncExcludeNamespaces}} | ||
- --excluded-namespace={{ $hncExcludeNamespace }} | ||
{{- end }} | ||
- --webhook-server-port=9443 | ||
- --metrics-addr=:8080 | ||
- --max-reconciles=10 | ||
- --apiserver-qps-throttle=50 | ||
- --nopropagation-label=cattle.io/creator=norman | ||
- --webhooks-only | ||
command: | ||
- /manager | ||
image: {{ .Values.image.repository }}:{{ .Values.image.tag | default "hnc-manager:latest" }} | ||
livenessProbe: | ||
failureThreshold: 1 | ||
httpGet: | ||
path: /healthz | ||
port: 8081 | ||
periodSeconds: 10 | ||
name: manager | ||
ports: | ||
- containerPort: 9443 | ||
name: webhook-server | ||
protocol: TCP | ||
- containerPort: 8080 | ||
name: metrics | ||
protocol: TCP | ||
- containerPort: 8081 | ||
name: healthz | ||
protocol: TCP | ||
readinessProbe: | ||
httpGet: | ||
path: /readyz | ||
port: 8081 | ||
periodSeconds: 5 | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: | ||
- ALL | ||
readOnlyRootFilesystem: true | ||
runAsNonRoot: true | ||
seccompProfile: | ||
type: RuntimeDefault | ||
startupProbe: | ||
failureThreshold: 100 | ||
httpGet: | ||
path: /readyz | ||
port: 8081 | ||
periodSeconds: 5 | ||
volumeMounts: | ||
- mountPath: /tmp/k8s-webhook-server/serving-certs | ||
name: cert | ||
readOnly: true | ||
{{- with .Values.imagePullPolicy }} | ||
imagePullPolicy: {{ .Values.image.imagePullPolicy }} | ||
{{- end }} | ||
{{- with .Values.ha.manager.resources }} | ||
resources: {{- toYaml . | nindent 12}} | ||
{{- end }} | ||
securityContext: | ||
fsGroup: 2000 | ||
runAsNonRoot: true | ||
runAsUser: 1000 | ||
terminationGracePeriodSeconds: 10 | ||
volumes: | ||
- name: cert | ||
secret: | ||
defaultMode: 420 | ||
secretName: {{ include "hnc.fullname" . }}-webhook-server-cert | ||
{{- with .Values.ha.manager.nodeSelector }} | ||
nodeSelector: {{- toYaml . | nindent 8}} | ||
{{- end }} | ||
{{- with .Values.ha.manager.affinity }} | ||
affinity: {{- toYaml . | nindent 8}} | ||
{{- end }} | ||
{{- with .Values.ha.manager.tolerations }} | ||
tolerations: {{- toYaml . | nindent 8}} | ||
{{- end }} | ||
{{- end }} | ||
{{- if .Values.ha.enabled }} | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
control-plane: controller-manager | ||
name: {{ include "hnc.fullname" . }}-controller-manager-ha | ||
namespace: {{ include "hnc.namespace" . }} | ||
spec: | ||
replicas: 3 | ||
selector: | ||
matchLabels: | ||
control-plane: controller-manager-ha | ||
template: | ||
metadata: | ||
annotations: | ||
prometheus.io/scrape: "true" | ||
labels: | ||
control-plane: controller-manager-ha | ||
spec: | ||
containers: | ||
- args: | ||
{{- if .Values.hrq.enabled }} | ||
- --enable-hrq | ||
{{- end }} | ||
{{- if $hncIncludeNamespacesRegex}} | ||
- --included-namespace-regex={{ $hncIncludeNamespacesRegex }} | ||
{{- end }} | ||
{{- range $hncExcludeNamespace := .Values.hncExcludeNamespaces}} | ||
- --excluded-namespace={{ $hncExcludeNamespace }} | ||
{{- end }} | ||
- --webhook-server-port=9443 | ||
- --metrics-addr=:8080 | ||
- --max-reconciles=10 | ||
- --apiserver-qps-throttle=50 | ||
- --nopropagation-label=cattle.io/creator=norman | ||
- --webhooks-only | ||
command: | ||
- /manager | ||
image: {{ .Values.image.repository }}:{{ .Values.image.tag | default "hnc-manager:latest" }} | ||
livenessProbe: | ||
failureThreshold: 1 | ||
httpGet: | ||
path: /healthz | ||
port: 8081 | ||
periodSeconds: 10 | ||
name: manager | ||
ports: | ||
- containerPort: 9443 | ||
name: webhook-server | ||
protocol: TCP | ||
- containerPort: 8080 | ||
name: metrics | ||
protocol: TCP | ||
- containerPort: 8081 | ||
name: healthz | ||
protocol: TCP | ||
readinessProbe: | ||
httpGet: | ||
path: /readyz | ||
port: 8081 | ||
periodSeconds: 5 | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: | ||
- ALL | ||
readOnlyRootFilesystem: true | ||
runAsNonRoot: true | ||
seccompProfile: | ||
type: RuntimeDefault | ||
startupProbe: | ||
failureThreshold: 100 | ||
httpGet: | ||
path: /readyz | ||
port: 8081 | ||
periodSeconds: 5 | ||
volumeMounts: | ||
- mountPath: /tmp/k8s-webhook-server/serving-certs | ||
name: cert | ||
readOnly: true | ||
{{- with .Values.imagePullPolicy }} | ||
imagePullPolicy: {{ .Values.image.imagePullPolicy }} | ||
{{- end }} | ||
{{- with .Values.ha.manager.resources }} | ||
resources: {{- toYaml . | nindent 12}} | ||
{{- end }} | ||
securityContext: | ||
fsGroup: 2000 | ||
runAsNonRoot: true | ||
runAsUser: 1000 | ||
terminationGracePeriodSeconds: 10 | ||
volumes: | ||
- name: cert | ||
secret: | ||
defaultMode: 420 | ||
secretName: {{ include "hnc.fullname" . }}-webhook-server-cert | ||
{{- with .Values.ha.manager.nodeSelector }} | ||
nodeSelector: {{- toYaml . | nindent 8}} | ||
{{- end }} | ||
{{- with .Values.ha.manager.affinity }} | ||
affinity: {{- toYaml . | nindent 8}} | ||
{{- end }} | ||
{{- with .Values.ha.manager.tolerations }} | ||
tolerations: {{- toYaml . | nindent 8}} | ||
{{- end }} | ||
{{- end }} |
Oops, something went wrong.