diff --git a/Makefile b/Makefile index a022224748..c2667b53be 100644 --- a/Makefile +++ b/Makefile @@ -229,6 +229,12 @@ install: manifests deploy-controller: docker-build docker-push kustomize build config/installbundle/releases/scopes/cluster/withworkloadidentity | sed -e 's/$${PROJECT_ID?}/${PROJECT_ID}/g'| kubectl apply -f - ${CONTEXT_FLAG} +# Deploy controller only, this will skip CRD install in the configured K8s and usually runs much +# faster than "make deploy". It is useful if you only want to quickly apply code change in controller +.PHONY: deploy-controller-autopilot +deploy-controller-autopilot: docker-build docker-push + kustomize build config/installbundle/releases/scopes/cluster/autopilot-withworkloadidentity | sed -e 's/$${PROJECT_ID?}/${PROJECT_ID}/g'| kubectl apply -f - ${CONTEXT_FLAG} + # Generate CRD go clients .PHONY: generate-go-client generate-go-client: @@ -365,7 +371,7 @@ deploy-kcc-standard: docker-build docker-push config-connector-manifests-standar .PHONY: deploy-kcc-autopilot deploy-kcc-autopilot: docker-build docker-push config-connector-manifests-autopilot push-operator-manifest kubectl apply -f config/installbundle/release-manifests/autopilot/manifests.yaml ${CONTEXT_FLAG} - kustomize build config/installbundle/releases/scopes/cluster/withworkloadidentity | sed -e 's/$${PROJECT_ID?}/${PROJECT_ID}/g'| kubectl apply -f - ${CONTEXT_FLAG} + kustomize build config/installbundle/releases/scopes/cluster/autopilot-withworkloadidentity | sed -e 's/$${PROJECT_ID?}/${PROJECT_ID}/g'| kubectl apply -f - ${CONTEXT_FLAG} .PHONY: powertool-tests powertool-tests: diff --git a/config/installbundle/releases/scopes/cluster/autopilot-withsecretvolume/kustomization.yaml b/config/installbundle/releases/scopes/cluster/autopilot-withsecretvolume/kustomization.yaml index 1dcda63dd2..455cdf0027 100644 --- a/config/installbundle/releases/scopes/cluster/autopilot-withsecretvolume/kustomization.yaml +++ b/config/installbundle/releases/scopes/cluster/autopilot-withsecretvolume/kustomization.yaml @@ -17,4 +17,11 @@ resources: - ../withsecretvolume patches: - path: hostnetwork_patch.yaml - +patchesJson6902: +- target: + group: apps + version: v1 + kind: Deployment + name: cnrm-resource-stats-recorder + namespace: cnrm-system + path: recorder_remove_hostport_patch.yaml diff --git a/operator/config/autopilot-channels/cluster-gcp-identity/recorder_remove_hostport_patch.yaml b/config/installbundle/releases/scopes/cluster/autopilot-withsecretvolume/recorder_remove_hostport_patch.yaml similarity index 100% rename from operator/config/autopilot-channels/cluster-gcp-identity/recorder_remove_hostport_patch.yaml rename to config/installbundle/releases/scopes/cluster/autopilot-withsecretvolume/recorder_remove_hostport_patch.yaml diff --git a/config/installbundle/releases/scopes/cluster/autopilot-withworkloadidentity/kustomization.yaml b/config/installbundle/releases/scopes/cluster/autopilot-withworkloadidentity/kustomization.yaml index 01dd2d8ebb..2e1cc5e9ed 100644 --- a/config/installbundle/releases/scopes/cluster/autopilot-withworkloadidentity/kustomization.yaml +++ b/config/installbundle/releases/scopes/cluster/autopilot-withworkloadidentity/kustomization.yaml @@ -17,4 +17,11 @@ resources: - ../withworkloadidentity patches: - path: hostnetwork_patch.yaml - +patchesJson6902: +- target: + group: apps + version: v1 + kind: Deployment + name: cnrm-resource-stats-recorder + namespace: cnrm-system + path: recorder_remove_hostport_patch.yaml diff --git a/operator/config/autopilot-channels/cluster-workload-identity/recorder_remove_hostport_patch.yaml b/config/installbundle/releases/scopes/cluster/autopilot-withworkloadidentity/recorder_remove_hostport_patch.yaml similarity index 100% rename from operator/config/autopilot-channels/cluster-workload-identity/recorder_remove_hostport_patch.yaml rename to config/installbundle/releases/scopes/cluster/autopilot-withworkloadidentity/recorder_remove_hostport_patch.yaml diff --git a/config/installbundle/releases/scopes/namespaced/autopilot-shared-components/kustomization.yaml b/config/installbundle/releases/scopes/namespaced/autopilot-shared-components/kustomization.yaml index 6cad62b755..b289fa8c3c 100644 --- a/config/installbundle/releases/scopes/namespaced/autopilot-shared-components/kustomization.yaml +++ b/config/installbundle/releases/scopes/namespaced/autopilot-shared-components/kustomization.yaml @@ -17,4 +17,12 @@ resources: - ../shared-components patches: - path: hostnetwork_patch.yaml +patchesJson6902: +- target: + group: apps + version: v1 + kind: Deployment + name: cnrm-resource-stats-recorder + namespace: cnrm-system + path: recorder_remove_hostport_patch.yaml diff --git a/operator/config/autopilot-channels/namespaced-main/recorder_remove_hostport_patch.yaml b/config/installbundle/releases/scopes/namespaced/autopilot-shared-components/recorder_remove_hostport_patch.yaml similarity index 100% rename from operator/config/autopilot-channels/namespaced-main/recorder_remove_hostport_patch.yaml rename to config/installbundle/releases/scopes/namespaced/autopilot-shared-components/recorder_remove_hostport_patch.yaml diff --git a/operator/config/autopilot-channels/cluster-gcp-identity/kustomization.yaml b/operator/config/autopilot-channels/cluster-gcp-identity/kustomization.yaml index d10b332804..718533cd1a 100644 --- a/operator/config/autopilot-channels/cluster-gcp-identity/kustomization.yaml +++ b/operator/config/autopilot-channels/cluster-gcp-identity/kustomization.yaml @@ -13,13 +13,4 @@ # limitations under the License. resources: -- ../release-bundle/install-bundle-autopilot-gcp-identity/0-cnrm-system.yaml - -patchesJson6902: -- target: - group: apps - version: v1 - kind: Deployment - name: cnrm-resource-stats-recorder - namespace: cnrm-system - path: recorder_remove_hostport_patch.yaml +- ../release-bundle/install-bundle-autopilot-gcp-identity/0-cnrm-system.yaml \ No newline at end of file diff --git a/operator/config/autopilot-channels/cluster-workload-identity/kustomization.yaml b/operator/config/autopilot-channels/cluster-workload-identity/kustomization.yaml index e3e41c1295..c76efb52fb 100644 --- a/operator/config/autopilot-channels/cluster-workload-identity/kustomization.yaml +++ b/operator/config/autopilot-channels/cluster-workload-identity/kustomization.yaml @@ -13,13 +13,4 @@ # limitations under the License. resources: -- ../release-bundle/install-bundle-autopilot-workload-identity/0-cnrm-system.yaml - -patchesJson6902: -- target: - group: apps - version: v1 - kind: Deployment - name: cnrm-resource-stats-recorder - namespace: cnrm-system - path: recorder_remove_hostport_patch.yaml \ No newline at end of file +- ../release-bundle/install-bundle-autopilot-workload-identity/0-cnrm-system.yaml \ No newline at end of file diff --git a/operator/config/autopilot-channels/namespaced-main/kustomization.yaml b/operator/config/autopilot-channels/namespaced-main/kustomization.yaml index 66d32e3914..b2a9122abb 100644 --- a/operator/config/autopilot-channels/namespaced-main/kustomization.yaml +++ b/operator/config/autopilot-channels/namespaced-main/kustomization.yaml @@ -13,13 +13,4 @@ # limitations under the License. resources: -- ../release-bundle/install-bundle-autopilot-namespaced/0-cnrm-system.yaml - -patchesJson6902: -- target: - group: apps - version: v1 - kind: Deployment - name: cnrm-resource-stats-recorder - namespace: cnrm-system - path: recorder_remove_hostport_patch.yaml +- ../release-bundle/install-bundle-autopilot-namespaced/0-cnrm-system.yaml \ No newline at end of file