From f6f401c7273b600f8936072371d5975b730e7441 Mon Sep 17 00:00:00 2001 From: Jamie Zieziula Date: Fri, 9 Feb 2024 15:44:55 -0500 Subject: [PATCH] remove deployment --- .../prefect-worker/templates/deployment.yaml | 177 ------------------ 1 file changed, 177 deletions(-) delete mode 100644 charts/prefect-worker/templates/deployment.yaml diff --git a/charts/prefect-worker/templates/deployment.yaml b/charts/prefect-worker/templates/deployment.yaml deleted file mode 100644 index 1969b2ce..00000000 --- a/charts/prefect-worker/templates/deployment.yaml +++ /dev/null @@ -1,177 +0,0 @@ -apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }} -kind: Deployment -metadata: - name: {{ template "common.names.fullname" . }} - namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - app.kubernetes.io/component: worker - prefect-version: {{ .Chart.AppVersion }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} -spec: - replicas: {{ .Values.worker.replicaCount }} - selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} - app.kubernetes.io/component: worker - template: - metadata: - {{- if .Values.worker.podAnnotations }} - annotations: {{- include "common.tplvalues.render" (dict "value" .Values.worker.podAnnotations "context" $) | nindent 8 }} - {{- end }} - labels: {{- include "common.labels.standard" . | nindent 8 }} - app.kubernetes.io/component: worker - prefect-version: {{ .Chart.AppVersion }} - {{- if .Values.worker.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.worker.podLabels "context" $) | nindent 8 }} - {{- end }} - spec: - {{- if .Values.worker.image.pullSecrets }} - imagePullSecrets: - {{- range .Values.worker.image.pullSecrets }} - - name: {{ . }} - {{- end }} - {{- end }} - serviceAccountName: {{ template "worker.serviceAccountName" . }} - {{- if .Values.worker.affinity }} - affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.worker.affinity "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.worker.nodeSelector }} - nodeSelector: {{- include "common.tplvalues.render" ( dict "value" .Values.worker.nodeSelector "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.worker.tolerations }} - tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.worker.tolerations "context" .) | nindent 8 }} - {{- end }} - {{- if .Values.worker.podSecurityContext }} - securityContext: {{- .Values.worker.podSecurityContext | toYaml | nindent 8 }} - {{- end }} - {{- if .Values.worker.priorityClassName }} - priorityClassName: {{ .Values.worker.priorityClassName }} - {{- end }} - containers: - - name: prefect-worker - image: "{{ .Values.worker.image.repository }}:{{ .Values.worker.image.prefectTag }}" - imagePullPolicy: {{ .Values.worker.image.pullPolicy }} - command: - - /usr/bin/tini - - -g - - -- - - /opt/prefect/entrypoint.sh - args: - - prefect - - worker - - start - - --type - - {{ .Values.worker.config.type | quote }} - - --pool - - {{ required "A Work Pool Name is required (worker.config.workPool)" .Values.worker.config.workPool | quote }} - {{- range .Values.worker.config.workQueues }} - - --work-queue - - {{ . }} - {{- end }} - - --install-policy - - {{ .Values.worker.config.installPolicy | quote }} - {{- if .Values.worker.config.limit }} - - --limit - - {{ .Values.worker.config.limit | quote }} - {{- end }} - {{- if .Values.worker.livenessProbe.enabled }} - - --with-healthcheck - {{- end }} - {{- if .Values.worker.config.name }} - - --name - - {{ .Values.worker.config.name | quote }} - {{- end }} - {{- if .Values.worker.config.baseJobTemplate }} - - --base-job-template - - baseJobTemplate.json - {{- end }} - {{- range .Values.worker.extraArgs }} - - {{ . | toString }} - {{- end }} - workingDir: /home/prefect - env: - - name: HOME - value: /home/prefect - - name: PREFECT_WORKER_PREFETCH_SECONDS - value: {{ .Values.worker.config.prefetchSeconds | quote }} - - name: PREFECT_WORKER_QUERY_SECONDS - value: {{ .Values.worker.config.queryInterval | quote }} - - name: PREFECT_API_ENABLE_HTTP2 - value: {{ .Values.worker.config.http2 | quote }} - - name: PREFECT_API_URL - value: {{ template "worker.apiUrl" . }} - - name: PREFECT_KUBERNETES_CLUSTER_UID - value: {{ template "worker.clusterUUID" . }} - {{- if eq .Values.worker.apiConfig "cloud" }} - - name: PREFECT_API_KEY - valueFrom: - secretKeyRef: - name: {{ .Values.worker.cloudApiConfig.apiKeySecret.name }} - key: {{ .Values.worker.cloudApiConfig.apiKeySecret.key }} - {{- else if eq .Values.worker.apiConfig "selfHosted" }} - - name: PREFECT_API_KEY - valueFrom: - secretKeyRef: - name: {{ .Values.worker.selfHostedCloudApiConfig.apiKeySecret.name }} - key: {{ .Values.worker.selfHostedCloudApiConfig.apiKeySecret.key }} - {{- end }} - - name: PREFECT_DEBUG_MODE - value: {{ .Values.worker.image.debug | quote }} - {{- if .Values.worker.extraEnvVars }} - {{- include "common.tplvalues.render" (dict "value" .Values.worker.extraEnvVars "context" $) | nindent 12 }} - {{- end }} - envFrom: - {{- if .Values.worker.extraEnvVarsCM }} - - configMapRef: - name: {{ include "common.tplvalues.render" (dict "value" .Values.worker.extraEnvVarsCM "context" $) }} - {{- end }} - {{- if .Values.worker.extraEnvVarsSecret }} - - secretRef: - name: {{ include "common.tplvalues.render" (dict "value" .Values.worker.extraEnvVarsSecret "context" $) }} - {{- end }} - {{- if .Values.worker.resources }} - resources: {{- toYaml .Values.worker.resources | nindent 12 }} - {{- end }} - {{- if .Values.worker.containerSecurityContext }} - securityContext: {{- .Values.worker.containerSecurityContext | toYaml | nindent 12 }} - {{- end }} - {{- if .Values.worker.livenessProbe.enabled }} - livenessProbe: - httpGet: - path: /health - port: 8080 - {{- toYaml .Values.worker.livenessProbe.config | nindent 12 }} - {{- end }} - volumeMounts: - - mountPath: /home/prefect - name: scratch - subPathExpr: home - - mountPath: /tmp - name: scratch - subPathExpr: tmp - {{- if .Values.worker.config.baseJobTemplate }} - - mountPath: /home/prefect/baseJobTemplate.json - name: base-job-template-file - subPath: baseJobTemplate.json - {{- end }} - {{- if .Values.worker.extraVolumeMounts }} - {{- include "common.tplvalues.render" (dict "value" .Values.worker.extraVolumeMounts "context" $) | nindent 12 }} - {{- end }} - {{- if .Values.worker.extraContainers }} - {{- include "common.tplvalues.render" (dict "value" .Values.agent.extraContainers "context" $) | nindent 8 }} - {{- end }} - volumes: - - name: scratch - emptyDir: {} - {{- if .Values.worker.extraVolumes }} - {{- include "common.tplvalues.render" (dict "value" .Values.worker.extraVolumes "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.worker.config.baseJobTemplate }} - - name: base-job-template-file - configMap: - name: {{ default "prefect-worker-base-job-template" .Values.worker.config.baseJobTemplateName . }} - {{- end }}