From 681eee15d4042f82162453affa7e897c69b6a63f Mon Sep 17 00:00:00 2001 From: jm96441n Date: Mon, 21 Oct 2024 15:27:46 -0400 Subject: [PATCH] rename field in values file, remove references to pod security policy --- .../templates/sync-catalog-cleanup-on-uninstall-job.yaml | 4 +--- .../consul/templates/sync-catalog-cleanup-on-upgrade-job.yaml | 2 +- .../templates/sync-catalog-cleanup-podsecuritypolicy.yaml | 2 +- .../consul/templates/sync-catalog-cleanup-serviceaccount.yaml | 2 +- charts/consul/values.yaml | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/charts/consul/templates/sync-catalog-cleanup-on-uninstall-job.yaml b/charts/consul/templates/sync-catalog-cleanup-on-uninstall-job.yaml index 0e4c6c3fff..626b325985 100644 --- a/charts/consul/templates/sync-catalog-cleanup-on-uninstall-job.yaml +++ b/charts/consul/templates/sync-catalog-cleanup-on-uninstall-job.yaml @@ -1,4 +1,4 @@ -{{- if .Values.syncCatalog.purgeServicesOnDisable }} +{{- if .Values.syncCatalog.cleanupNodeOnRemoval }} apiVersion: batch/v1 kind: Job metadata: @@ -98,9 +98,7 @@ spec: -metrics-port={{ .Values.syncCatalog.metrics.port }} \ {{- end }} -prometheus-retention-time={{ .Values.global.metrics.agentMetricsRetentionTime }} \ - {{- if .Release.IsUpgrade }} -purge-k8s-services-from-node - {{- end }} {{- if .Values.global.acls.tolerations }} tolerations: {{ tpl .Values.global.acls.tolerations . | indent 8 | trim }} diff --git a/charts/consul/templates/sync-catalog-cleanup-on-upgrade-job.yaml b/charts/consul/templates/sync-catalog-cleanup-on-upgrade-job.yaml index f9dfd1cccc..a14d4a9a9f 100644 --- a/charts/consul/templates/sync-catalog-cleanup-on-upgrade-job.yaml +++ b/charts/consul/templates/sync-catalog-cleanup-on-upgrade-job.yaml @@ -1,5 +1,5 @@ {{- $syncCatalogEnabled := (or (and (ne (.Values.syncCatalog.enabled | toString) "-") .Values.syncCatalog.enabled) (and (eq (.Values.syncCatalog.enabled | toString) "-") .Values.global.enabled)) }} -{{- if and (not $syncCatalogEnabled) .Values.syncCatalog.purgeServicesOnDisable }} +{{- if and (not $syncCatalogEnabled) .Values.syncCatalog.cleanupNodeOnRemoval }} apiVersion: batch/v1 kind: Job metadata: diff --git a/charts/consul/templates/sync-catalog-cleanup-podsecuritypolicy.yaml b/charts/consul/templates/sync-catalog-cleanup-podsecuritypolicy.yaml index c3c847b4ae..7050250653 100644 --- a/charts/consul/templates/sync-catalog-cleanup-podsecuritypolicy.yaml +++ b/charts/consul/templates/sync-catalog-cleanup-podsecuritypolicy.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.syncCatalog.purgeServicesOnDisable .Values.global.enablePodSecurityPolicies }} +{{- if and .Values.syncCatalog.cleanupNodeOnRemoval }} apiVersion: policy/v1beta1 kind: PodSecurityPolicy metadata: diff --git a/charts/consul/templates/sync-catalog-cleanup-serviceaccount.yaml b/charts/consul/templates/sync-catalog-cleanup-serviceaccount.yaml index 162cdf6905..b4bd141ed7 100644 --- a/charts/consul/templates/sync-catalog-cleanup-serviceaccount.yaml +++ b/charts/consul/templates/sync-catalog-cleanup-serviceaccount.yaml @@ -1,4 +1,4 @@ -{{- if .Values.syncCatalog.purgeServicesOnDisable }} +{{- if .Values.syncCatalog.cleanupNodeOnRemoval }} apiVersion: v1 kind: ServiceAccount metadata: diff --git a/charts/consul/values.yaml b/charts/consul/values.yaml index 94b025c535..13615e716c 100644 --- a/charts/consul/values.yaml +++ b/charts/consul/values.yaml @@ -2092,7 +2092,7 @@ syncCatalog: # True if you want to deregister all services in this cluster from consul that have been registered by the catalog sync when the `enabled` flag is set to false. # @type: boolean - purgeServicesOnDisable: false + cleanupNodeOnRemoval: false # The name of the Docker image (including any tag) for consul-k8s-control-plane # to run the sync program.