diff --git a/charts/README.md b/.obs/chartfile/README.md similarity index 100% rename from charts/README.md rename to .obs/chartfile/README.md diff --git a/charts/crds/templates/crds.yaml b/.obs/chartfile/crds/templates/crds.yaml similarity index 100% rename from charts/crds/templates/crds.yaml rename to .obs/chartfile/crds/templates/crds.yaml diff --git a/charts/crds/templates/validate-no-pending-deletions.yaml b/.obs/chartfile/crds/templates/validate-no-pending-deletions.yaml similarity index 100% rename from charts/crds/templates/validate-no-pending-deletions.yaml rename to .obs/chartfile/crds/templates/validate-no-pending-deletions.yaml diff --git a/charts/operator/app-readme.md b/.obs/chartfile/operator/app-readme.md similarity index 100% rename from charts/operator/app-readme.md rename to .obs/chartfile/operator/app-readme.md diff --git a/charts/operator/questions.yaml b/.obs/chartfile/operator/questions.yaml similarity index 100% rename from charts/operator/questions.yaml rename to .obs/chartfile/operator/questions.yaml diff --git a/charts/operator/templates/_helpers.tpl b/.obs/chartfile/operator/templates/_helpers.tpl similarity index 100% rename from charts/operator/templates/_helpers.tpl rename to .obs/chartfile/operator/templates/_helpers.tpl diff --git a/charts/operator/templates/apiservice.yaml b/.obs/chartfile/operator/templates/apiservice.yaml similarity index 100% rename from charts/operator/templates/apiservice.yaml rename to .obs/chartfile/operator/templates/apiservice.yaml diff --git a/charts/operator/templates/capi_rbac.yaml b/.obs/chartfile/operator/templates/capi_rbac.yaml similarity index 100% rename from charts/operator/templates/capi_rbac.yaml rename to .obs/chartfile/operator/templates/capi_rbac.yaml diff --git a/charts/operator/templates/channel.yaml b/.obs/chartfile/operator/templates/channel.yaml similarity index 100% rename from charts/operator/templates/channel.yaml rename to .obs/chartfile/operator/templates/channel.yaml diff --git a/charts/operator/templates/cluster_role.yaml b/.obs/chartfile/operator/templates/cluster_role.yaml similarity index 100% rename from charts/operator/templates/cluster_role.yaml rename to .obs/chartfile/operator/templates/cluster_role.yaml diff --git a/charts/operator/templates/cluster_role_binding.yaml b/.obs/chartfile/operator/templates/cluster_role_binding.yaml similarity index 100% rename from charts/operator/templates/cluster_role_binding.yaml rename to .obs/chartfile/operator/templates/cluster_role_binding.yaml diff --git a/charts/operator/templates/deployment.yaml b/.obs/chartfile/operator/templates/deployment.yaml similarity index 100% rename from charts/operator/templates/deployment.yaml rename to .obs/chartfile/operator/templates/deployment.yaml diff --git a/charts/operator/templates/globalrole.yaml b/.obs/chartfile/operator/templates/globalrole.yaml similarity index 100% rename from charts/operator/templates/globalrole.yaml rename to .obs/chartfile/operator/templates/globalrole.yaml diff --git a/charts/operator/templates/serviceaccount.yaml b/.obs/chartfile/operator/templates/serviceaccount.yaml similarity index 100% rename from charts/operator/templates/serviceaccount.yaml rename to .obs/chartfile/operator/templates/serviceaccount.yaml diff --git a/charts/operator/templates/validate-install-crd.yaml b/.obs/chartfile/operator/templates/validate-install-crd.yaml similarity index 100% rename from charts/operator/templates/validate-install-crd.yaml rename to .obs/chartfile/operator/templates/validate-install-crd.yaml diff --git a/Makefile b/Makefile index 934a1e5a4..cd404041e 100644 --- a/Makefile +++ b/Makefile @@ -120,10 +120,17 @@ build-docker-push-seedimage-builder: build-docker-seedimage-builder .PHONY: chart chart: mkdir -p $(ROOT_DIR)/build - cp -rf $(ROOT_DIR)/charts/crds $(ROOT_DIR)/build/crds - helm package --version ${CHART_VERSION} --app-version ${GIT_TAG} -d $(ROOT_DIR)/build/ $(ROOT_DIR)/build/crds + cp -rf $(ROOT_DIR)/.obs/chartfile/crds $(ROOT_DIR)/build/crds + mv $(ROOT_DIR)/build/crds/_helmignore $(ROOT_DIR)/build/crds/.helmignore + yq -i '.version = "${CHART_VERSION}"' $(ROOT_DIR)/build/crds/Chart.yaml + yq -i '.appVersion = "${GIT_TAG}"' $(ROOT_DIR)/build/crds/Chart.yaml + ls -R $(ROOT_DIR)/build/crds + helm package -d $(ROOT_DIR)/build/ $(ROOT_DIR)/build/crds rm -Rf $(ROOT_DIR)/build/crds - cp -rf $(ROOT_DIR)/charts/operator $(ROOT_DIR)/build/operator + cp -rf $(ROOT_DIR)/.obs/chartfile/operator $(ROOT_DIR)/build/operator + mv $(ROOT_DIR)/build/operator/_helmignore $(ROOT_DIR)/build/operator/.helmignore + yq -i '.version = "${CHART_VERSION}"' $(ROOT_DIR)/build/operator/Chart.yaml + yq -i '.appVersion = "${GIT_TAG}"' $(ROOT_DIR)/build/operator/Chart.yaml yq -i '.image.tag = "${CHART_VERSION}"' $(ROOT_DIR)/build/operator/values.yaml yq -i '.image.repository = "${REPO}"' $(ROOT_DIR)/build/operator/values.yaml yq -i '.seedImage.tag = "${TAG_SEEDIMAGE}"' $(ROOT_DIR)/build/operator/values.yaml @@ -131,16 +138,9 @@ chart: yq -i '.channel.tag = "${TAG_CHANNEL}"' $(ROOT_DIR)/build/operator/values.yaml yq -i '.channel.repository = "${REPO_CHANNEL}"' $(ROOT_DIR)/build/operator/values.yaml yq -i '.registryUrl = "${REGISTRY_URL}"' $(ROOT_DIR)/build/operator/values.yaml - helm package --version ${CHART_VERSION} --app-version ${CHART_VERSION} -d $(ROOT_DIR)/build/ $(ROOT_DIR)/build/operator + helm package -d $(ROOT_DIR)/build/ $(ROOT_DIR)/build/operator rm -Rf $(ROOT_DIR)/build/operator -.PHONY: migration-chart -migration-chart: - mkdir -p $(ROOT_DIR)/build - cp -rf $(ROOT_DIR)/charts/crds-migration $(ROOT_DIR)/build/crds-migration - helm package -d $(ROOT_DIR)/build/ $(ROOT_DIR)/build/crds-migration - rm -Rf $(ROOT_DIR)/build/crds-migration - validate: scripts/validate @@ -218,10 +218,10 @@ generate-go: $(CONTROLLER_GEN) ## Runs Go related generate targets for the opera ./scripts/generate_mocks.sh build-crds: $(KUSTOMIZE) - $(KUSTOMIZE) build config/crd > charts/crds/templates/crds.yaml + $(KUSTOMIZE) build config/crd > .obs/chartfile/crds/templates/crds.yaml build-rbac: $(KUSTOMIZE) - $(KUSTOMIZE) build config/rbac > charts/operator/templates/cluster_role.yaml + $(KUSTOMIZE) build config/rbac > .obs/chartfile/operator/templates/cluster_role.yaml build-manifests: $(KUSTOMIZE) generate $(MAKE) build-crds diff --git a/charts/crds/Chart.yaml b/charts/crds/Chart.yaml deleted file mode 100644 index c8385a452..000000000 --- a/charts/crds/Chart.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -apiVersion: v2 -name: elemental-operator-crds -description: A Helm chart for deploying Rancher Elemental Operator CRDs -version: 0.0.0 -appVersion: 0.0.0 -annotations: - catalog.cattle.io/certified: rancher - catalog.cattle.io/namespace: cattle-elemental-system - catalog.cattle.io/release-name: elemental-operator-crds - catalog.cattle.io/hidden: true # Hide specific charts. Only use on CRD charts. diff --git a/charts/operator/Chart.yaml b/charts/operator/Chart.yaml deleted file mode 100644 index 47e4077f1..000000000 --- a/charts/operator/Chart.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -apiVersion: v2 -name: elemental-operator -description: Rancher Elemental Operator -icon: https://raw.githubusercontent.com/rancher/elemental/main/logo/icon-elemental.svg -version: 0.0.0 -appVersion: 0.0.0 -annotations: - catalog.cattle.io/auto-install: elemental-operator-crds=match - catalog.cattle.io/certified: rancher - catalog.cattle.io/display-name: Elemental - catalog.cattle.io/kube-version: '>= 1.23.0-0' - catalog.cattle.io/namespace: cattle-elemental-system - catalog.cattle.io/os: linux - catalog.cattle.io/permits-os: linux - catalog.cattle.io/provides-gvr: elemental.cattle.io/v1beta1 - catalog.cattle.io/rancher-version: '>= 2.7.0-0' - catalog.cattle.io/release-name: elemental-operator - catalog.cattle.io/scope: management - catalog.cattle.io/type: cluster-tool diff --git a/charts/operator/README.md b/charts/operator/README.md deleted file mode 100644 index bf7b83ea6..000000000 --- a/charts/operator/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Elemental Operator Helm Chart - -This chart bootstraps an elemental-operator deployment on a [Rancher Manager](https://rancher.com/docs/rancher/) cluster using the [Helm](https://helm.sh) package manager. - -Check out the [Elemental Operator Helm Chart documentation](https://elemental.docs.rancher.com/elementaloperatorchart-reference/) in the official [Elemental guide](https://elemental.docs.rancher.com/). diff --git a/charts/operator/values.yaml b/charts/operator/values.yaml deleted file mode 100644 index f88efdc56..000000000 --- a/charts/operator/values.yaml +++ /dev/null @@ -1,42 +0,0 @@ -image: - empty: rancher/pause:3.1 - repository: "rancher/elemental-operator" - tag: latest - imagePullPolicy: IfNotPresent - -seedImage: - repository: "rancher/seedimage-builder" - tag: latest - imagePullPolicy: IfNotPresent - -channel: - repository: "rancher/elemental-channel" - tag: latest - -# number of operator replicas to deploy -replicas: 1 - -# http[s] proxy server -# proxy: http://@:: - -# comma separated list of domains or ip addresses that will not use the proxy -noProxy: 127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,.svc,.cluster.local - -global: - cattle: - systemDefaultRegistry: "" - -# used only if systemDefaultRegistry is empty -registryUrl: "" - -# enable debug output for operator -debug: false - -nodeSelector: - kubernetes.io/os: linux - -tolerations: - - key: cattle.io/os - operator: "Equal" - value: "linux" - effect: NoSchedule