Skip to content

Commit

Permalink
udpate charts
Browse files Browse the repository at this point in the history
Signed-off-by: Zhiwei Yin <[email protected]>
  • Loading branch information
zhiweiyin318 committed Sep 25, 2024
1 parent 312068c commit cb31ef6
Show file tree
Hide file tree
Showing 38 changed files with 102 additions and 32 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ update:
install-mce: ensure-helm
$(HELM) install mce ./e2e/mce-chart

install-acm-addons: ensure-helm
$(HELM) install acm-addons ./acm-addons
install-policy: ensure-helm
$(HELM) install policy ./policy

test-e2e:
hack/e2e.sh
Expand Down
11 changes: 3 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,15 @@ The MCE operator is required to be installed on the Hub cluster.
kubectl apply -f ./configuration/klusterletconfig.yaml
```

2. Patch the `addonDeploymentConfig` for hypershift addon on non-OCP case.

```
kubectl apply -f ./configuration/addondeploymentconfig.yaml
```

# Install ACM addons after MCE is installed
# Install Policy after MCE is installed

```
helm install acm-addon ./acm-addons
helm install acm-addon ./policy
```

# Enable policy addon for local-cluster

```
kubectl apply -f ./configuration/klusterletaddonconfig.yaml
```
```
10 changes: 10 additions & 0 deletions e2e/mce-chart/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,13 @@
{{- end }}
{{- end }}
{{- end }}

{{- define "kube_rbac_proxy_mce" }}
{{- with .Values.images }}
{{- if .overrides.kube_rbac_proxy_mce }}
{{- printf "%s" .overrides.kube_rbac_proxy_mce }}
{{- else }}
{{- printf "%s/kube-rbac-proxy-mce:%s" .registry .tag }}
{{- end }}
{{- end }}
{{- end }}
74 changes: 74 additions & 0 deletions e2e/mce-chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,78 @@ spec:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- name: OPERAND_IMAGE_APISERVER_NETWORK_PROXY
value: quay.io/stolostron/apiserver-network-proxy@sha256
- name: OPERAND_IMAGE_ASSISTED_IMAGE_SERVICE
value: quay.io/stolostron/assisted-image-service@sha256
- name: OPERAND_IMAGE_ASSISTED_INSTALLER
value: quay.io/stolostron/assisted-installer@sha256
- name: OPERAND_IMAGE_ASSISTED_INSTALLER_AGENT
value: quay.io/stolostron/assisted-installer-agent@sha256
- name: OPERAND_IMAGE_ASSISTED_INSTALLER_CONTROLLER
value: quay.io/stolostron/assisted-installer-controller@sha256
- name: OPERAND_IMAGE_ASSISTED_SERVICE_9
value: quay.io/stolostron/assisted-service@sha256
- name: OPERAND_IMAGE_ASSISTED_SERVICE_8
value: quay.io/stolostron/assisted-service-el8@sha256
- name: OPERAND_IMAGE_AWS_ENCRYPTION_PROVIDER
value: quay.io/stolostron/aws-encryption-provider@sha256
- name: OPERAND_IMAGE_BACKPLANE_MUST_GATHER
value: quay.io/stolostron/backplane-must-gather@sha256
- name: OPERAND_IMAGE_BACKPLANE_OPERATOR_TEST
value: quay.io/stolostron/backplane-operator-test@sha256
- name: OPERAND_IMAGE_CLUSTER_API
value: quay.io/stolostron/cluster-api@sha256
- name: OPERAND_IMAGE_CLUSTER_API_PROVIDER_AWS
value: quay.io/stolostron/cluster-api-aws-controller@sha256
- name: OPERAND_IMAGE_CLUSTER_API_PROVIDER_AGENT
value: quay.io/stolostron/cluster-api-provider-agent@sha256
- name: OPERAND_IMAGE_CLUSTER_API_PROVIDER_AZURE
value: quay.io/stolostron/cluster-api-provider-azure@sha256
- name: OPERAND_IMAGE_CLUSTER_API_PROVIDER_KUBEVIRT
value: quay.io/stolostron/cluster-api-provider-kubevirt@sha256
- name: OPERAND_IMAGE_CLUSTER_CURATOR_CONTROLLER
value: quay.io/stolostron/cluster-curator-controller@sha256
- name: OPERAND_IMAGE_CLUSTER_IMAGE_SET_CONTROLLER
value: quay.io/stolostron/cluster-image-set-controller@sha256
- name: OPERAND_IMAGE_CLUSTER_PROXY
value: quay.io/stolostron/cluster-proxy@sha256
- name: OPERAND_IMAGE_CLUSTER_PROXY_ADDON
value: quay.io/stolostron/cluster-proxy-addon@sha256
- name: OPERAND_IMAGE_CLUSTERCLAIMS_CONTROLLER
value: quay.io/stolostron/clusterclaims-controller@sha256
- name: OPERAND_IMAGE_CLUSTERLIFECYCLE_STATE_METRICS
value: quay.io/stolostron/clusterlifecycle-state-metrics@sha256
- name: OPERAND_IMAGE_CONSOLE_MCE
value: quay.io/stolostron/console-mce@sha256
- name: OPERAND_IMAGE_DISCOVERY_OPERATOR
value: quay.io/stolostron/discovery-operator@sha256
- name: OPERAND_IMAGE_DISCOVERY_OPERATOR_TESTS
value: quay.io/stolostron/discovery-operator-tests@sha256
- name: OPERAND_IMAGE_DISCOVERY_TESTSERVER
value: quay.io/stolostron/discovery-testserver@sha256
- name: OPERAND_IMAGE_FOUNDATION_E2E
value: quay.io/stolostron/foundation-e2e@sha256
- name: OPERAND_IMAGE_HELLOPROW_GO
value: quay.io/stolostron/helloprow-go@sha256
- name: OPERAND_IMAGE_HELLOWORLD
value: quay.io/stolostron/helloworld@sha256
- name: OPERAND_IMAGE_OPENSHIFT_HIVE
value: quay.io/stolostron/hive@sha256
- name: OPERAND_IMAGE_HYPERSHIFT_ADDON_OPERATOR_CANARY_TEST
value: quay.io/stolostron/hypershift-addon-operator-canary-test@sha256
- name: OPERAND_IMAGE_HYPERSHIFT_OPERATOR
value: quay.io/stolostron/hypershift-operator@sha256
- name: OPERAND_IMAGE_IMAGE_BASED_INSTALL_OPERATOR
value: quay.io/stolostron/image-based-install-operator@sha256
- name: OPERAND_IMAGE_MANAGED_SERVICEACCOUNT
value: quay.io/stolostron/managed-serviceaccount@sha256
- name: OPERAND_IMAGE_MANAGED_SERVICEACCOUNT_E2E
value: quay.io/stolostron/managed-serviceaccount-e2e@sha256
- name: OPERAND_IMAGE_POSTGRESQL_12
value: quay.io/stolostron/postgresql-12-centos7@sha256
- name: OPERAND_IMAGE_PROVIDER_CREDENTIAL_CONTROLLER
value: quay.io/stolostron/provider-credential-controller@sha256
- name: OPERAND_IMAGE_ADDON_MANAGER
value: {{ template "addon_manager" . }}
- name: OPERAND_IMAGE_BACKPLANE_OPERATOR
Expand All @@ -73,6 +145,8 @@ spec:
value: {{ template "registration_operator" . }}
- name: OPERAND_IMAGE_WORK
value: {{ template "work" . }}
- name: OPERAND_IMAGE_KUBE_RBAC_PROXY_MCE
value: {{ template "kube_rbac_proxy_mce" . }}
- name: OPERATOR_VERSION
value: {{ .Chart.AppVersion }}
- name: OPERATOR_PACKAGE
Expand Down
3 changes: 2 additions & 1 deletion e2e/mce-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
replicaCount: 1
images:
registry: "quay.io/stolostron"
tag: "2.7.0-BACKPLANE-2024-09-23-23-56-45"
tag: "2.12.0-SNAPSHOT-2024-09-24-23-38-54"

# the components image name fromat is regisrtry/component:tag, the images.overrides can override the image if not empty.
overrides:
Expand All @@ -15,5 +15,6 @@ images:
work: ""
registration: ""
placement: ""
kube_rbac_proxy_mce: ""
imageCredentials:
dockerConfigJson: ""
28 changes: 9 additions & 19 deletions hack/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,6 @@ echo ""
echo "###### Wait unitl cluster-manager is created ######"
waitForReady "kubectl get clustermanagers.operator.open-cluster-management.io | grep -c \"cluster-manager\"" 1

echo ""
echo "###### Wait unitl local-cluster is created ######"
waitForReady "kubectl get mcl | grep -c \"local-cluster\"" 1

echo ""
echo "###### Wait unitl MCE CR is Available ######"
# TODO: set to 1 after MCE can be Available
waitForReady "kubectl get mce multiclusterengine | grep -c \"Available\"" 0

echo ""
echo "#### Configure MCE ####"

Expand All @@ -69,26 +60,25 @@ echo "###### Create global klusterletconfig ######"
kubectl apply -f ./configuration/klusterletconfig.yaml

echo ""
echo "###### Wait until addondeploymentconfigs CRD is installed ######"
waitForReady "kubectl get crds | grep -c \"addondeploymentconfigs\"" 1
echo "###### Wait unitl local-cluster is created ######"
waitForReady "kubectl get mcl | grep -c \"local-cluster\"" 1

echo ""
echo "###### Patch addondeploymentconfig for hypershift addon ######"
kubectl apply -f configuration/addondeploymentconfig.yaml

echo ""
echo "###### Wait unitl MCE CR is Available ######"
waitForReady "kubectl get mce multiclusterengine | grep -c \"Available\"" 1

echo ""
echo "#### Install ACM addons #####"
make install-acm-addons
echo "#### Install Policy addons #####"
make install-policy

echo ""
echo "###### Enable policy for local-cluster ######"
echo "###### Enable policy addons for local-cluster ######"
kubectl apply -f ./configuration/klusterletaddonconfig.yaml

echo ""
echo "###### Wait unitl 4 addons in local-cluster is Available ######"
# TODO: set to 4 after hypershift addon is Available.
waitForReady "kubectl get mca -n local-cluster | grep -c \"True\"" 3
waitForReady "kubectl get mca -n local-cluster | grep -c \"True\"" 4

echo ""
echo "!!!!!!!!!! MCE + policy is installed succussfully !!!!!!!!!!!!"
Expand Down
2 changes: 1 addition & 1 deletion acm-addons/Chart.yaml → policy/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v1
appVersion: 2.12.0
version: 2.12.0
description: A Helm chart for ACM addons
name: acm-addons
name: policy
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion acm-addons/values.yaml → policy/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
global:
registry: "quay.io/stolostron"
tag: "2.12.0-SNAPSHOT-2024-09-23-23-44-29"
tag: "2.12.0-SNAPSHOT-2024-09-24-23-38-54"
imageOverrides:
governance_policy_propagator: ""
governance_policy_addon_controller: ""
Expand Down

0 comments on commit cb31ef6

Please sign in to comment.