Skip to content

Commit 0579443

Browse files
committed
UPSTREAM: <carry>: Patch ASO Deployment arguments
Signed-off-by: Nolan Brubaker <[email protected]>
1 parent bce21fb commit 0579443

File tree

6 files changed

+66
-4
lines changed

6 files changed

+66
-4
lines changed

openshift/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ ocp-manifests: $(RELEASE_DIR) $(KUSTOMIZE) check-env ## Builds openshift specifi
2222
$(KUSTOMIZE) build > infrastructure-components.yaml
2323
# Generate provider manifests.
2424
# TODO: load the provider-version dynamically at rebase time when this is invoked by the Rebase Bot during one of its lifecycle hooks.
25-
cd tools && $(MANIFESTS_GEN) --provider-name "azure" --provider-type "InfrastructureProvider" --provider-version "${PROVIDER_VERSION}" --base-path "../../" --manifests-path "../manifests"
25+
cd tools && $(MANIFESTS_GEN) --provider-name "azure" --provider-type "InfrastructureProvider" --provider-version "${PROVIDER_VERSION}" --base-path "../../" --manifests-path "../manifests" --kustomize-dir="openshift"

openshift/infrastructure-components-openshift.yaml

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15620,7 +15620,7 @@ spec:
1562015620
- --health-addr=:8081
1562115621
- --enable-leader-election
1562215622
- --v=2
15623-
- --crd-pattern=${ADDITIONAL_ASO_CRDS:= }
15623+
- --crd-management=none
1562415624
- --webhook-port=9443
1562515625
- --webhook-cert-dir=/tmp/k8s-webhook-server/serving-certs
1562615626
env:
@@ -80117,3 +80117,43 @@ status:
8011780117
plural: ""
8011880118
conditions: null
8011980119
storedVersions: null
80120+
---
80121+
apiVersion: admissionregistration.k8s.io/v1beta1
80122+
kind: ValidatingAdmissionPolicy
80123+
metadata:
80124+
name: openshift-cluster-api-protect-azurecluster
80125+
spec:
80126+
failurePolicy: Fail
80127+
matchConstraints:
80128+
resourceRules:
80129+
- apiGroups:
80130+
- infrastructure.cluster.x-k8s.io
80131+
apiVersions:
80132+
- '*'
80133+
operations:
80134+
- DELETE
80135+
resources:
80136+
- azureclusters
80137+
paramKind:
80138+
apiVersion: config.openshift.io/v1
80139+
kind: Infrastructure
80140+
validations:
80141+
- expression: '!(oldObject.metadata.name == params.status.infrastructureName)'
80142+
message: InfraCluster resources with metadata.name corresponding to the cluster
80143+
infrastructureName cannot be deleted.
80144+
---
80145+
apiVersion: admissionregistration.k8s.io/v1beta1
80146+
kind: ValidatingAdmissionPolicyBinding
80147+
metadata:
80148+
name: openshift-cluster-api-protect-azurecluster
80149+
spec:
80150+
matchResources:
80151+
namespaceSelector:
80152+
matchLabels:
80153+
kubernetes.io/metadata.name: openshift-cluster-api
80154+
paramRef:
80155+
name: cluster
80156+
parameterNotFoundAction: Deny
80157+
policyName: openshift-cluster-api-protect-azurecluster
80158+
validationActions:
80159+
- Deny

openshift/infrastructure-components.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67511,7 +67511,7 @@ spec:
6751167511
- --health-addr=:8081
6751267512
- --enable-leader-election
6751367513
- --v=2
67514-
- --crd-pattern=${ADDITIONAL_ASO_CRDS:= }
67514+
- --crd-management=none
6751567515
- --webhook-port=9443
6751667516
- --webhook-cert-dir=/tmp/k8s-webhook-server/serving-certs
6751767517
env:

openshift/kustomization.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@ kind: Kustomization
33

44
resources:
55
- ../config/default
6+
7+
# This field is deprecated in Kustomize v5; however, we rely on an earlier version and cannot use `patches` yet.
8+
patchesStrategicMerge:
9+
- ./patches/aso-disable-crds.yaml

openshift/manifests/0000_30_cluster-api_04_cm.infrastructure-azure.yaml

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: azureserviceoperator-controller-manager
5+
namespace: azureserviceoperator-system # This patch is processed before manifests-gen updates the namespace
6+
spec:
7+
template:
8+
spec:
9+
containers:
10+
- name: manager
11+
args:
12+
- --metrics-addr=:8080
13+
- --health-addr=:8081
14+
- --enable-leader-election
15+
- --v=2
16+
- --crd-management=none
17+
- --webhook-port=9443
18+
- --webhook-cert-dir=/tmp/k8s-webhook-server/serving-certs

0 commit comments

Comments
 (0)