diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 559bded..ab4b6ab 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -126,7 +126,7 @@ jobs: printf "Update generated parts of helm chart\n" make before-push printf "Install helm chart\n" - helm install -n lightrun-k8s-operator lightrun-k8s-operator ./helm-chart -f .github/workflows/tests_data/chart_values.yaml + helm install -n lightrun-k8s-operator lightrun-k8s-operator ./charts/lightrun-operator -f .github/workflows/tests_data/chart_values.yaml kubectl wait deployment sample-deployment --for condition=Available=True --timeout=90s diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 244f8f1..8c64d83 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -8,8 +8,7 @@ on: paths-ignore: - lightrun-init-agent/* - .github/** - - helm-chart/* - - charts/* + - charts/** - grafana/* - config/* - examples/* @@ -55,12 +54,12 @@ jobs: - name: Install Helm uses: azure/setup-helm@v4 - - name: Pack Helm chart + - name: Pack Operator Helm chart shell: bash run: | - yq -i '.version = "${{steps.release_tag.outputs.new_tag}}"' helm-chart/Chart.yaml - yq -i '.controllerManager.manager.image.tag = "${{steps.release_tag.outputs.new_tag}}"' helm-chart/values.yaml - helm package ./helm-chart -u -d ./helm-repo/ + yq -i '.version = "${{steps.release_tag.outputs.new_tag}}"' charts/lightrun-operator/Chart.yaml + yq -i '.controllerManager.manager.image.tag = "${{steps.release_tag.outputs.new_tag}}"' charts/lightrun-operator/values.yaml + helm package ./charts/lightrun-operator -u -d ./helm-repo/ - name: Pack Lightrun Agents Helm chart shell: bash run: | diff --git a/Makefile b/Makefile index 0b34c93..efe59a6 100644 --- a/Makefile +++ b/Makefile @@ -173,10 +173,10 @@ deploy-to-file: manifests kustomize ## Prepare all manifests in 1 file. .PHONY: before-push before-push: manifests generate kustomize fmt vet deploy-to-file - $(KUSTOMIZE) build config/crd --output helm-chart/crds/lightrunjavaagent_crd.yaml - $(KUSTOMIZE) build config/rbac | yq 'select(.metadata.name == "leader-election-role").rules' > helm-chart/generated/rbac_leader_election_rules.yaml - $(KUSTOMIZE) build config/rbac | yq 'select(.metadata.name == "manager-role").rules' > helm-chart/generated/rbac_manager_rules.yaml - helm template ./helm-chart > examples/operator.yaml --include-crds --namespace lightrun-operator + $(KUSTOMIZE) build config/crd --output charts/lightrun-operator/crds/lightrunjavaagent_crd.yaml + $(KUSTOMIZE) build config/rbac | yq 'select(.metadata.name == "leader-election-role").rules' > charts/lightrun-operator/generated/rbac_leader_election_rules.yaml + $(KUSTOMIZE) build config/rbac | yq 'select(.metadata.name == "manager-role").rules' > charts/lightrun-operator/generated/rbac_manager_rules.yaml + helm template ./charts/lightrun-operator > examples/operator.yaml --include-crds --namespace lightrun-operator ## Location to install dependencies to LOCALBIN ?= $(shell pwd)/bin diff --git a/helm-chart/.helmignore b/charts/lightrun-operator/.helmignore similarity index 100% rename from helm-chart/.helmignore rename to charts/lightrun-operator/.helmignore diff --git a/helm-chart/Chart.yaml b/charts/lightrun-operator/Chart.yaml similarity index 100% rename from helm-chart/Chart.yaml rename to charts/lightrun-operator/Chart.yaml diff --git a/helm-chart/README.md b/charts/lightrun-operator/README.md similarity index 98% rename from helm-chart/README.md rename to charts/lightrun-operator/README.md index 0aab366..89c892f 100644 --- a/helm-chart/README.md +++ b/charts/lightrun-operator/README.md @@ -21,7 +21,7 @@ helm repo add lightrun-k8s-operator https://lightrun-platform.github.io/lightrun ``` - Install the Helm chart: -> _Using default [values](../helm-chart/values.yaml)_ +> _Using default [values](../lightrun-operator/values.yaml)_ ```sh helm install lightrun-k8s-operator/lightrun-k8s-operator -n lightrun-operator --create-namespace diff --git a/helm-chart/crds/lightrunjavaagent_crd.yaml b/charts/lightrun-operator/crds/lightrunjavaagent_crd.yaml similarity index 100% rename from helm-chart/crds/lightrunjavaagent_crd.yaml rename to charts/lightrun-operator/crds/lightrunjavaagent_crd.yaml diff --git a/helm-chart/generated/rbac_leader_election_rules.yaml b/charts/lightrun-operator/generated/rbac_leader_election_rules.yaml similarity index 100% rename from helm-chart/generated/rbac_leader_election_rules.yaml rename to charts/lightrun-operator/generated/rbac_leader_election_rules.yaml diff --git a/helm-chart/generated/rbac_manager_rules.yaml b/charts/lightrun-operator/generated/rbac_manager_rules.yaml similarity index 100% rename from helm-chart/generated/rbac_manager_rules.yaml rename to charts/lightrun-operator/generated/rbac_manager_rules.yaml diff --git a/helm-chart/templates/_helpers.tpl b/charts/lightrun-operator/templates/_helpers.tpl similarity index 100% rename from helm-chart/templates/_helpers.tpl rename to charts/lightrun-operator/templates/_helpers.tpl diff --git a/helm-chart/templates/deployment.yaml b/charts/lightrun-operator/templates/deployment.yaml similarity index 100% rename from helm-chart/templates/deployment.yaml rename to charts/lightrun-operator/templates/deployment.yaml diff --git a/helm-chart/templates/leader-election-rbac.yaml b/charts/lightrun-operator/templates/leader-election-rbac.yaml similarity index 100% rename from helm-chart/templates/leader-election-rbac.yaml rename to charts/lightrun-operator/templates/leader-election-rbac.yaml diff --git a/helm-chart/templates/manager-rbac-namespaced.yaml b/charts/lightrun-operator/templates/manager-rbac-namespaced.yaml similarity index 100% rename from helm-chart/templates/manager-rbac-namespaced.yaml rename to charts/lightrun-operator/templates/manager-rbac-namespaced.yaml diff --git a/helm-chart/templates/manager-rbac.yaml b/charts/lightrun-operator/templates/manager-rbac.yaml similarity index 100% rename from helm-chart/templates/manager-rbac.yaml rename to charts/lightrun-operator/templates/manager-rbac.yaml diff --git a/helm-chart/templates/metrics-reader-rbac.yaml b/charts/lightrun-operator/templates/metrics-reader-rbac.yaml similarity index 100% rename from helm-chart/templates/metrics-reader-rbac.yaml rename to charts/lightrun-operator/templates/metrics-reader-rbac.yaml diff --git a/helm-chart/templates/metrics-service.yaml b/charts/lightrun-operator/templates/metrics-service.yaml similarity index 100% rename from helm-chart/templates/metrics-service.yaml rename to charts/lightrun-operator/templates/metrics-service.yaml diff --git a/helm-chart/values.yaml b/charts/lightrun-operator/values.yaml similarity index 100% rename from helm-chart/values.yaml rename to charts/lightrun-operator/values.yaml diff --git a/docs/README.md b/docs/README.md index 5dc7c50..bbb7ee2 100644 --- a/docs/README.md +++ b/docs/README.md @@ -84,14 +84,14 @@ kubectl apply -f agent.yaml -n lightrun-agent-test ## Example with Helm Chart -[Helm chart](../helm-chart/) is available in repository branch `helm-repo` +[Helm chart](../charts/lightrun-operator/) is available in repository branch `helm-repo` - Add the repo to your Helm repository list ```sh helm repo add lightrun-k8s-operator https://lightrun-platform.github.io/lightrun-k8s-operator ``` - Install the Helm chart: -> _Using default [values](../helm-chart/values.yaml)_ +> _Using default [values](../charts/lightrun-operator/values.yaml)_ ```sh helm install lightrun-k8s-operator/lightrun-k8s-operator -n lightrun-operator --create-namespace