mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-10-31 18:28:13 +00:00 
			
		
		
		
	Allow overriding the default list of resources of list in addon-manager
This commit is contained in:
		| @@ -28,28 +28,34 @@ | |||||||
|  |  | ||||||
| KUBECTL=${KUBECTL_BIN:-/usr/local/bin/kubectl} | KUBECTL=${KUBECTL_BIN:-/usr/local/bin/kubectl} | ||||||
| KUBECTL_OPTS=${KUBECTL_OPTS:-} | KUBECTL_OPTS=${KUBECTL_OPTS:-} | ||||||
| # KUBECTL_PRUNE_WHITELIST is a list of resources whitelisted by | # KUBECTL_PRUNE_WHITELIST is a list of resources whitelisted by default. | ||||||
| # default. |  | ||||||
| # This is currently the same with the default in: | # This is currently the same with the default in: | ||||||
| # https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/apply.go | # https://github.com/kubernetes/kubectl/blob/master/pkg/cmd/apply/prune.go. | ||||||
| KUBECTL_PRUNE_WHITELIST=( | # To override the default list with other values, set | ||||||
|   core/v1/ConfigMap | # KUBECTL_PRUNE_WHITELIST_OVERRIDE environment variable to space-separated | ||||||
|   core/v1/Endpoints | # names of resources to whitelist. | ||||||
|   core/v1/Namespace | if [ -z "${KUBECTL_PRUNE_WHITELIST_OVERRIDE:-}" ]; then | ||||||
|   core/v1/PersistentVolumeClaim |   KUBECTL_PRUNE_WHITELIST=( | ||||||
|   core/v1/PersistentVolume |     core/v1/ConfigMap | ||||||
|   core/v1/Pod |     core/v1/Endpoints | ||||||
|   core/v1/ReplicationController |     core/v1/Namespace | ||||||
|   core/v1/Secret |     core/v1/PersistentVolumeClaim | ||||||
|   core/v1/Service |     core/v1/PersistentVolume | ||||||
|   batch/v1/Job |     core/v1/Pod | ||||||
|   batch/v1beta1/CronJob |     core/v1/ReplicationController | ||||||
|   apps/v1/DaemonSet |     core/v1/Secret | ||||||
|   apps/v1/Deployment |     core/v1/Service | ||||||
|   apps/v1/ReplicaSet |     batch/v1/Job | ||||||
|   apps/v1/StatefulSet |     batch/v1beta1/CronJob | ||||||
|   extensions/v1beta1/Ingress |     apps/v1/DaemonSet | ||||||
| ) |     apps/v1/Deployment | ||||||
|  |     apps/v1/ReplicaSet | ||||||
|  |     apps/v1/StatefulSet | ||||||
|  |     extensions/v1beta1/Ingress | ||||||
|  |   ) | ||||||
|  | else | ||||||
|  |   read -ra KUBECTL_PRUNE_WHITELIST <<< "${KUBECTL_PRUNE_WHITELIST_OVERRIDE}" | ||||||
|  | fi | ||||||
|  |  | ||||||
| ADDON_CHECK_INTERVAL_SEC=${TEST_ADDON_CHECK_INTERVAL_SEC:-60} | ADDON_CHECK_INTERVAL_SEC=${TEST_ADDON_CHECK_INTERVAL_SEC:-60} | ||||||
| ADDON_PATH=${ADDON_PATH:-/etc/kubernetes/addons} | ADDON_PATH=${ADDON_PATH:-/etc/kubernetes/addons} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Antoni Zawodny
					Antoni Zawodny