Skip to content

Commit

Permalink
Consistently manage admin acks
Browse files Browse the repository at this point in the history
We eventually require the admin-acks ConfigMap [1] in all of our
clusters. Rather than duplicating it everywhere, including it in base
and use a ConfigMap generator to populate it in each overlay.

Part-of: nerc-project/operations#285

[1]: https://docs.openshift.com/container-platform/4.14/updating/preparing_for_updates/updating-cluster-prepare.html#update-preparing-ack_updating-cluster-prepare
  • Loading branch information
larsks committed Nov 27, 2023
1 parent 9ce01ed commit e0d9fa3
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
apiVersion: v1
kind: ConfigMap
data:
ack-4.11-kube-1.25-api-removals-in-4.12: "true"
ack-4.12-kube-1.26-api-removals-in-4.13: "true"
metadata:
annotations:
include.release.openshift.io/ibm-cloud-managed: "true"
include.release.openshift.io/self-managed-high-availability: "true"
kubernetes.io/description: Record administrator acknowledgments of update gates
defined in the admin-gates ConfigMap in the openshift-config-managed namespace.
kubernetes.io/description: Record administrator acknowledgments of update gates defined in the admin-gates ConfigMap in the openshift-config-managed namespace.
release.openshift.io/create-only: "true"
name: admin-acks
namespace: openshift-config
data: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- configmap.yaml
1 change: 1 addition & 0 deletions cluster-scope/overlays/common/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ kind: Kustomization

resources:
- ../../base/openapi
- ../../base/core/configmaps/admin-acks/
- ../../base/machineconfiguration.openshift.io/kubeletconfigs/system-reserved
- ../../base/config.openshift.io/oauths/cluster
- ../../base/rbac.authorization.k8s.io/clusterroles/node-labeler/
Expand Down
7 changes: 6 additions & 1 deletion cluster-scope/overlays/nerc-ocp-infra/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ resources:
- ../../base/core/namespaces/nerc-ocp-prod
- ../../base/operators.coreos.com/subscriptions/openshift-pipelines-operator
- ../../base/operators.coreos.com/subscriptions/loki-operator
- configmaps/admin-acks.yaml
- clusterversion.yaml
- machineconfigs/disable-net-ifnames.yaml
- machineconfigs/refresh-storage-interface.yaml
Expand All @@ -38,6 +37,12 @@ generatorOptions:
disableNameSuffixHash: true

configMapGenerator:
- name: admin-acks
namespace: openshift-config
behavior: merge
literals:
- ack-4.11-kube-1.25-api-removals-in-4.12=true
- ack-4.12-kube-1.26-api-removals-in-4.13=true
- files:
- config.yaml=configmaps/cluster-monitoring-config.yaml
name: cluster-monitoring-config
Expand Down
14 changes: 0 additions & 14 deletions cluster-scope/overlays/nerc-ocp-prod/configmaps/admin-acks.yaml

This file was deleted.

7 changes: 6 additions & 1 deletion cluster-scope/overlays/nerc-ocp-prod/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ resources:
- machineconfigs/udev-rules
- machineconfigs/configure-bond0
- nodenetworkconfigurationpolicies
- configmaps/admin-acks.yaml
- clusterversion.yaml
- certificates
- consolelinks
Expand All @@ -49,6 +48,12 @@ generatorOptions:
disableNameSuffixHash: true

configMapGenerator:
- name: admin-acks
namespace: openshift-config
behavior: merge
literals:
- ack-4.11-kube-1.25-api-removals-in-4.12=true
- ack-4.12-kube-1.26-api-removals-in-4.13=true
- files:
- config.yaml=configmaps/cluster-monitoring-config.yaml
name: cluster-monitoring-config
Expand Down

0 comments on commit e0d9fa3

Please sign in to comment.