From 8771f25551803596f1f928bd93c49ccc85396c74 Mon Sep 17 00:00:00 2001 From: Jack Lin Date: Fri, 7 Jul 2023 16:46:25 +0800 Subject: [PATCH] fix: remove admission, conversion webhook and recovery backend deployment templates from the helm chart ref: longhorn/longhorn 6246 Signed-off-by: Jack Lin --- .../deployment-recovery-backend.yaml | 83 --------- .../templates/deployment-webhook.yaml | 166 ------------------ 2 files changed, 249 deletions(-) delete mode 100644 charts/longhorn/templates/deployment-recovery-backend.yaml delete mode 100644 charts/longhorn/templates/deployment-webhook.yaml diff --git a/charts/longhorn/templates/deployment-recovery-backend.yaml b/charts/longhorn/templates/deployment-recovery-backend.yaml deleted file mode 100644 index 81c8abad..00000000 --- a/charts/longhorn/templates/deployment-recovery-backend.yaml +++ /dev/null @@ -1,83 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: {{- include "longhorn.labels" . | nindent 4 }} - app: longhorn-recovery-backend - name: longhorn-recovery-backend - namespace: {{ include "release_namespace" . }} -spec: - replicas: {{ .Values.longhornRecoveryBackend.replicas }} - selector: - matchLabels: - app: longhorn-recovery-backend - template: - metadata: - labels: {{- include "longhorn.labels" . | nindent 8 }} - app: longhorn-recovery-backend - spec: - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - longhorn-recovery-backend - topologyKey: kubernetes.io/hostname - containers: - - name: longhorn-recovery-backend - image: {{ template "registry_url" . }}{{ .Values.image.longhorn.manager.repository }}:{{ .Values.image.longhorn.manager.tag }} - imagePullPolicy: {{ .Values.image.pullPolicy }} - securityContext: - runAsUser: 2000 - command: - - longhorn-manager - - recovery-backend - - --service-account - - longhorn-service-account - ports: - - containerPort: 9600 - name: recov-backend - readinessProbe: - tcpSocket: - port: 9600 - initialDelaySeconds: 3 - periodSeconds: 5 - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: NODE_NAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - {{- if .Values.privateRegistry.registrySecret }} - imagePullSecrets: - - name: {{ .Values.privateRegistry.registrySecret }} - {{- end }} - {{- if .Values.longhornRecoveryBackend.priorityClass }} - priorityClassName: {{ .Values.longhornRecoveryBackend.priorityClass | quote }} - {{- end }} - {{- if or .Values.longhornRecoveryBackend.tolerations .Values.global.cattle.windowsCluster.enabled }} - tolerations: - {{- if and .Values.global.cattle.windowsCluster.enabled .Values.global.cattle.windowsCluster.tolerations }} -{{ toYaml .Values.global.cattle.windowsCluster.tolerations | indent 6 }} - {{- end }} - {{- if .Values.longhornRecoveryBackend.tolerations }} -{{ toYaml .Values.longhornRecoveryBackend.tolerations | indent 6 }} - {{- end }} - {{- end }} - {{- if or .Values.longhornRecoveryBackend.nodeSelector .Values.global.cattle.windowsCluster.enabled }} - nodeSelector: - {{- if and .Values.global.cattle.windowsCluster.enabled .Values.global.cattle.windowsCluster.nodeSelector }} -{{ toYaml .Values.global.cattle.windowsCluster.nodeSelector | indent 8 }} - {{- end }} - {{- if .Values.longhornRecoveryBackend.nodeSelector }} -{{ toYaml .Values.longhornRecoveryBackend.nodeSelector | indent 8 }} - {{- end }} - {{- end }} - serviceAccountName: longhorn-service-account diff --git a/charts/longhorn/templates/deployment-webhook.yaml b/charts/longhorn/templates/deployment-webhook.yaml deleted file mode 100644 index c4d353a9..00000000 --- a/charts/longhorn/templates/deployment-webhook.yaml +++ /dev/null @@ -1,166 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: {{- include "longhorn.labels" . | nindent 4 }} - app: longhorn-conversion-webhook - name: longhorn-conversion-webhook - namespace: {{ include "release_namespace" . }} -spec: - replicas: {{ .Values.longhornConversionWebhook.replicas }} - selector: - matchLabels: - app: longhorn-conversion-webhook - template: - metadata: - labels: {{- include "longhorn.labels" . | nindent 8 }} - app: longhorn-conversion-webhook - spec: - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - longhorn-conversion-webhook - topologyKey: kubernetes.io/hostname - containers: - - name: longhorn-conversion-webhook - image: {{ template "registry_url" . }}{{ .Values.image.longhorn.manager.repository }}:{{ .Values.image.longhorn.manager.tag }} - imagePullPolicy: {{ .Values.image.pullPolicy }} - securityContext: - runAsUser: 2000 - command: - - longhorn-manager - - conversion-webhook - - --service-account - - longhorn-service-account - ports: - - containerPort: 9443 - name: conversion-wh - readinessProbe: - tcpSocket: - port: 9443 - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - {{- if .Values.privateRegistry.registrySecret }} - imagePullSecrets: - - name: {{ .Values.privateRegistry.registrySecret }} - {{- end }} - {{- if .Values.longhornConversionWebhook.priorityClass }} - priorityClassName: {{ .Values.longhornConversionWebhook.priorityClass | quote }} - {{- end }} - {{- if or .Values.longhornConversionWebhook.tolerations .Values.global.cattle.windowsCluster.enabled }} - tolerations: - {{- if and .Values.global.cattle.windowsCluster.enabled .Values.global.cattle.windowsCluster.tolerations }} -{{ toYaml .Values.global.cattle.windowsCluster.tolerations | indent 6 }} - {{- end }} - {{- if .Values.longhornConversionWebhook.tolerations }} -{{ toYaml .Values.longhornConversionWebhook.tolerations | indent 6 }} - {{- end }} - {{- end }} - {{- if or .Values.longhornConversionWebhook.nodeSelector .Values.global.cattle.windowsCluster.enabled }} - nodeSelector: - {{- if and .Values.global.cattle.windowsCluster.enabled .Values.global.cattle.windowsCluster.nodeSelector }} -{{ toYaml .Values.global.cattle.windowsCluster.nodeSelector | indent 8 }} - {{- end }} - {{- if .Values.longhornConversionWebhook.nodeSelector }} -{{ toYaml .Values.longhornConversionWebhook.nodeSelector | indent 8 }} - {{- end }} - {{- end }} - serviceAccountName: longhorn-service-account ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: {{- include "longhorn.labels" . | nindent 4 }} - app: longhorn-admission-webhook - name: longhorn-admission-webhook - namespace: {{ include "release_namespace" . }} -spec: - replicas: {{ .Values.longhornAdmissionWebhook.replicas }} - selector: - matchLabels: - app: longhorn-admission-webhook - template: - metadata: - labels: {{- include "longhorn.labels" . | nindent 8 }} - app: longhorn-admission-webhook - spec: - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - longhorn-admission-webhook - topologyKey: kubernetes.io/hostname - initContainers: - - name: wait-longhorn-conversion-webhook - image: {{ template "registry_url" . }}{{ .Values.image.longhorn.manager.repository }}:{{ .Values.image.longhorn.manager.tag }} - command: ['sh', '-c', 'while [ $(curl -m 1 -s -o /dev/null -w "%{http_code}" -k https://longhorn-conversion-webhook:9443/v1/healthz) != "200" ]; do echo waiting; sleep 2; done'] - imagePullPolicy: {{ .Values.image.pullPolicy }} - securityContext: - runAsUser: 2000 - containers: - - name: longhorn-admission-webhook - image: {{ template "registry_url" . }}{{ .Values.image.longhorn.manager.repository }}:{{ .Values.image.longhorn.manager.tag }} - imagePullPolicy: {{ .Values.image.pullPolicy }} - securityContext: - runAsUser: 2000 - command: - - longhorn-manager - - admission-webhook - - --service-account - - longhorn-service-account - ports: - - containerPort: 9443 - name: admission-wh - readinessProbe: - tcpSocket: - port: 9443 - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: NODE_NAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - {{- if .Values.privateRegistry.registrySecret }} - imagePullSecrets: - - name: {{ .Values.privateRegistry.registrySecret }} - {{- end }} - {{- if .Values.longhornAdmissionWebhook.priorityClass }} - priorityClassName: {{ .Values.longhornAdmissionWebhook.priorityClass | quote }} - {{- end }} - {{- if or .Values.longhornAdmissionWebhook.tolerations .Values.global.cattle.windowsCluster.enabled }} - tolerations: - {{- if and .Values.global.cattle.windowsCluster.enabled .Values.global.cattle.windowsCluster.tolerations }} -{{ toYaml .Values.global.cattle.windowsCluster.tolerations | indent 6 }} - {{- end }} - {{- if .Values.longhornAdmissionWebhook.tolerations }} -{{ toYaml .Values.longhornAdmissionWebhook.tolerations | indent 6 }} - {{- end }} - {{- end }} - {{- if or .Values.longhornAdmissionWebhook.nodeSelector .Values.global.cattle.windowsCluster.enabled }} - nodeSelector: - {{- if and .Values.global.cattle.windowsCluster.enabled .Values.global.cattle.windowsCluster.nodeSelector }} -{{ toYaml .Values.global.cattle.windowsCluster.nodeSelector | indent 8 }} - {{- end }} - {{- if .Values.longhornAdmissionWebhook.nodeSelector }} -{{ toYaml .Values.longhornAdmissionWebhook.nodeSelector | indent 8 }} - {{- end }} - {{- end }} - serviceAccountName: longhorn-service-account