From 00b0967f32d4214bf693e12589317ee423ad25e2 Mon Sep 17 00:00:00 2001 From: Edward Cheng Date: Mon, 15 Jul 2024 03:15:41 +1000 Subject: [PATCH 1/2] refactor local-path-provisioner --- .../base => kustomized-helm}/Chart.yaml | 15 +++++++++++---- .../base/{template => }/cluster-role-binding.yaml | 0 .../base/{template => }/cluster-role.yaml | 0 .../base/{template => }/deployment.yaml | 0 .../base/kustomization.yaml | 10 ++++++++++ .../base/{template => }/role-binding.yaml | 0 .../base/{template => }/role.yaml | 0 .../base/{template => }/service-account.yaml | 0 .../base/{template => }/storage-class.yaml | 0 .../env/k3s-cluster/kustomization.yaml | 7 ++----- 10 files changed, 23 insertions(+), 9 deletions(-) rename resources/{local-path-provisioner/base => kustomized-helm}/Chart.yaml (64%) rename resources/local-path-provisioner/base/{template => }/cluster-role-binding.yaml (100%) rename resources/local-path-provisioner/base/{template => }/cluster-role.yaml (100%) rename resources/local-path-provisioner/base/{template => }/deployment.yaml (100%) create mode 100644 resources/local-path-provisioner/base/kustomization.yaml rename resources/local-path-provisioner/base/{template => }/role-binding.yaml (100%) rename resources/local-path-provisioner/base/{template => }/role.yaml (100%) rename resources/local-path-provisioner/base/{template => }/service-account.yaml (100%) rename resources/local-path-provisioner/base/{template => }/storage-class.yaml (100%) diff --git a/resources/local-path-provisioner/base/Chart.yaml b/resources/kustomized-helm/Chart.yaml similarity index 64% rename from resources/local-path-provisioner/base/Chart.yaml rename to resources/kustomized-helm/Chart.yaml index 73cf757..946f402 100644 --- a/resources/local-path-provisioner/base/Chart.yaml +++ b/resources/kustomized-helm/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 -name: local-path-provisioner -description: local-path-provisioner helm chart for Kubernetes +name: guestbook +description: A Helm chart for Kubernetes # A chart can be either an 'application' or a 'library' chart. # @@ -14,8 +14,15 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) version: 0.1.0 # This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. -appVersion: 1.0.0 \ No newline at end of file +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +appVersion: "1.0" + +dependencies: +- name: helm-guestbook + version: 0.1.0 + repository: file://../../helm-guestbook \ No newline at end of file diff --git a/resources/local-path-provisioner/base/template/cluster-role-binding.yaml b/resources/local-path-provisioner/base/cluster-role-binding.yaml similarity index 100% rename from resources/local-path-provisioner/base/template/cluster-role-binding.yaml rename to resources/local-path-provisioner/base/cluster-role-binding.yaml diff --git a/resources/local-path-provisioner/base/template/cluster-role.yaml b/resources/local-path-provisioner/base/cluster-role.yaml similarity index 100% rename from resources/local-path-provisioner/base/template/cluster-role.yaml rename to resources/local-path-provisioner/base/cluster-role.yaml diff --git a/resources/local-path-provisioner/base/template/deployment.yaml b/resources/local-path-provisioner/base/deployment.yaml similarity index 100% rename from resources/local-path-provisioner/base/template/deployment.yaml rename to resources/local-path-provisioner/base/deployment.yaml diff --git a/resources/local-path-provisioner/base/kustomization.yaml b/resources/local-path-provisioner/base/kustomization.yaml new file mode 100644 index 0000000..ac927b5 --- /dev/null +++ b/resources/local-path-provisioner/base/kustomization.yaml @@ -0,0 +1,10 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ./service-account.yaml + - ./role.yaml + - ./cluster-role.yaml + - ./role-binding.yaml + - ./cluster-role-binding.yaml + - ./deployment.yaml + - ./storage-class.yaml \ No newline at end of file diff --git a/resources/local-path-provisioner/base/template/role-binding.yaml b/resources/local-path-provisioner/base/role-binding.yaml similarity index 100% rename from resources/local-path-provisioner/base/template/role-binding.yaml rename to resources/local-path-provisioner/base/role-binding.yaml diff --git a/resources/local-path-provisioner/base/template/role.yaml b/resources/local-path-provisioner/base/role.yaml similarity index 100% rename from resources/local-path-provisioner/base/template/role.yaml rename to resources/local-path-provisioner/base/role.yaml diff --git a/resources/local-path-provisioner/base/template/service-account.yaml b/resources/local-path-provisioner/base/service-account.yaml similarity index 100% rename from resources/local-path-provisioner/base/template/service-account.yaml rename to resources/local-path-provisioner/base/service-account.yaml diff --git a/resources/local-path-provisioner/base/template/storage-class.yaml b/resources/local-path-provisioner/base/storage-class.yaml similarity index 100% rename from resources/local-path-provisioner/base/template/storage-class.yaml rename to resources/local-path-provisioner/base/storage-class.yaml diff --git a/resources/local-path-provisioner/env/k3s-cluster/kustomization.yaml b/resources/local-path-provisioner/env/k3s-cluster/kustomization.yaml index f1b27dc..a227ac4 100644 --- a/resources/local-path-provisioner/env/k3s-cluster/kustomization.yaml +++ b/resources/local-path-provisioner/env/k3s-cluster/kustomization.yaml @@ -1,7 +1,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -helmCharts: - - name: local-path-provisioner - repo: ../../base - version: 0.1.0 - releaseName: local-path-provisioner \ No newline at end of file +resources: + - ../../base \ No newline at end of file From b2cd975ddd1926fcf545b0abd1f7d08a73cea5b2 Mon Sep 17 00:00:00 2001 From: Edward Cheng Date: Mon, 15 Jul 2024 03:16:01 +1000 Subject: [PATCH 2/2] refactor local-path-provisioner --- resources/kustomized-helm/Chart.yaml | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 resources/kustomized-helm/Chart.yaml diff --git a/resources/kustomized-helm/Chart.yaml b/resources/kustomized-helm/Chart.yaml deleted file mode 100644 index 946f402..0000000 --- a/resources/kustomized-helm/Chart.yaml +++ /dev/null @@ -1,28 +0,0 @@ -apiVersion: v2 -name: guestbook -description: A Helm chart for Kubernetes - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -appVersion: "1.0" - -dependencies: -- name: helm-guestbook - version: 0.1.0 - repository: file://../../helm-guestbook \ No newline at end of file