From 70e04602f3e5f7244378b684d700c405ff29a3e3 Mon Sep 17 00:00:00 2001 From: elliotxx <951376975@qq.com> Date: Thu, 18 Jul 2024 17:24:31 +0800 Subject: [PATCH 1/9] refactor: optimize karpor chart including directory structure, variables etc --- charts/karpor | 1 - .../0.4.0 => charts/karpor}/.helmignore | 0 .../karpor/0.4.2 => charts/karpor}/Chart.yaml | 2 +- .../karpor}/templates/elasticsearch.yml | 0 .../karpor}/templates/etcd.yml | 0 .../0.4.0 => charts/karpor}/templates/job.yml | 0 .../karpor}/templates/karpor-server.yml | 0 .../karpor}/templates/karpor-sync.yml | 0 .../karpor}/templates/namespace.yml | 0 .../0.4.2 => charts/karpor}/values.yaml | 0 versions/karpor/0.4.0/Chart.yaml | 24 ------- versions/karpor/0.4.0/values.yaml | 8 --- versions/karpor/0.4.2/.helmignore | 23 ------- .../karpor/0.4.2/templates/elasticsearch.yml | 65 ------------------- versions/karpor/0.4.2/templates/etcd.yml | 50 -------------- versions/karpor/0.4.2/templates/job.yml | 42 ------------ .../karpor/0.4.2/templates/karpor-server.yml | 49 -------------- .../karpor/0.4.2/templates/karpor-sync.yml | 37 ----------- versions/karpor/0.4.2/templates/namespace.yml | 6 -- 19 files changed, 1 insertion(+), 306 deletions(-) delete mode 120000 charts/karpor rename {versions/karpor/0.4.0 => charts/karpor}/.helmignore (100%) rename {versions/karpor/0.4.2 => charts/karpor}/Chart.yaml (93%) rename {versions/karpor/0.4.0 => charts/karpor}/templates/elasticsearch.yml (100%) rename {versions/karpor/0.4.0 => charts/karpor}/templates/etcd.yml (100%) rename {versions/karpor/0.4.0 => charts/karpor}/templates/job.yml (100%) rename {versions/karpor/0.4.0 => charts/karpor}/templates/karpor-server.yml (100%) rename {versions/karpor/0.4.0 => charts/karpor}/templates/karpor-sync.yml (100%) rename {versions/karpor/0.4.0 => charts/karpor}/templates/namespace.yml (100%) rename {versions/karpor/0.4.2 => charts/karpor}/values.yaml (100%) delete mode 100644 versions/karpor/0.4.0/Chart.yaml delete mode 100644 versions/karpor/0.4.0/values.yaml delete mode 100644 versions/karpor/0.4.2/.helmignore delete mode 100644 versions/karpor/0.4.2/templates/elasticsearch.yml delete mode 100644 versions/karpor/0.4.2/templates/etcd.yml delete mode 100644 versions/karpor/0.4.2/templates/job.yml delete mode 100644 versions/karpor/0.4.2/templates/karpor-server.yml delete mode 100644 versions/karpor/0.4.2/templates/karpor-sync.yml delete mode 100644 versions/karpor/0.4.2/templates/namespace.yml diff --git a/charts/karpor b/charts/karpor deleted file mode 120000 index 923a6fe..0000000 --- a/charts/karpor +++ /dev/null @@ -1 +0,0 @@ -../versions/karpor/0.4.2 \ No newline at end of file diff --git a/versions/karpor/0.4.0/.helmignore b/charts/karpor/.helmignore similarity index 100% rename from versions/karpor/0.4.0/.helmignore rename to charts/karpor/.helmignore diff --git a/versions/karpor/0.4.2/Chart.yaml b/charts/karpor/Chart.yaml similarity index 93% rename from versions/karpor/0.4.2/Chart.yaml rename to charts/karpor/Chart.yaml index 0193bea..8065b66 100644 --- a/versions/karpor/0.4.2/Chart.yaml +++ b/charts/karpor/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: karpor -description: A Helm chart for Karpor +description: A Helm chart for Karpor, a modern kubernetes visualization tool. # A chart can be either an 'application' or a 'library' chart. # diff --git a/versions/karpor/0.4.0/templates/elasticsearch.yml b/charts/karpor/templates/elasticsearch.yml similarity index 100% rename from versions/karpor/0.4.0/templates/elasticsearch.yml rename to charts/karpor/templates/elasticsearch.yml diff --git a/versions/karpor/0.4.0/templates/etcd.yml b/charts/karpor/templates/etcd.yml similarity index 100% rename from versions/karpor/0.4.0/templates/etcd.yml rename to charts/karpor/templates/etcd.yml diff --git a/versions/karpor/0.4.0/templates/job.yml b/charts/karpor/templates/job.yml similarity index 100% rename from versions/karpor/0.4.0/templates/job.yml rename to charts/karpor/templates/job.yml diff --git a/versions/karpor/0.4.0/templates/karpor-server.yml b/charts/karpor/templates/karpor-server.yml similarity index 100% rename from versions/karpor/0.4.0/templates/karpor-server.yml rename to charts/karpor/templates/karpor-server.yml diff --git a/versions/karpor/0.4.0/templates/karpor-sync.yml b/charts/karpor/templates/karpor-sync.yml similarity index 100% rename from versions/karpor/0.4.0/templates/karpor-sync.yml rename to charts/karpor/templates/karpor-sync.yml diff --git a/versions/karpor/0.4.0/templates/namespace.yml b/charts/karpor/templates/namespace.yml similarity index 100% rename from versions/karpor/0.4.0/templates/namespace.yml rename to charts/karpor/templates/namespace.yml diff --git a/versions/karpor/0.4.2/values.yaml b/charts/karpor/values.yaml similarity index 100% rename from versions/karpor/0.4.2/values.yaml rename to charts/karpor/values.yaml diff --git a/versions/karpor/0.4.0/Chart.yaml b/versions/karpor/0.4.0/Chart.yaml deleted file mode 100644 index 7c18f65..0000000 --- a/versions/karpor/0.4.0/Chart.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: v2 -name: karpor -description: A Helm chart for Karpor - -# 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.4.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. -# It is recommended to use it with quotes. -appVersion: 0.4.0 diff --git a/versions/karpor/0.4.0/values.yaml b/versions/karpor/0.4.0/values.yaml deleted file mode 100644 index baaf134..0000000 --- a/versions/karpor/0.4.0/values.yaml +++ /dev/null @@ -1,8 +0,0 @@ -# Default values for karpor. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -namespace: karpor -namespaceEnabled: true -port: 7443 -tag: v0.4.0 diff --git a/versions/karpor/0.4.2/.helmignore b/versions/karpor/0.4.2/.helmignore deleted file mode 100644 index 0e8a0eb..0000000 --- a/versions/karpor/0.4.2/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/versions/karpor/0.4.2/templates/elasticsearch.yml b/versions/karpor/0.4.2/templates/elasticsearch.yml deleted file mode 100644 index e1ecd0c..0000000 --- a/versions/karpor/0.4.2/templates/elasticsearch.yml +++ /dev/null @@ -1,65 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: elasticsearch - namespace: {{ .Values.namespace }} -spec: - ports: - - port: 9200 - selector: - app: elasticsearch ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: elasticsearch - name: elasticsearch - namespace: {{ .Values.namespace }} -spec: - replicas: 1 - selector: - matchLabels: - app: elasticsearch - template: - metadata: - labels: - app: elasticsearch - spec: - containers: - - env: - - name: discovery.type - value: single-node - - name: xpack.security.enabled - value: "false" - - name: xpack.security.http.ssl.enabled - value: "false" - - name: xpack.security.transport.ssl.enabled - value: "false" - - name: KIBANA_PASSWORD - value: dangerous0 - - name: ELASTIC_PASSWORD - value: elastic - - name: ES_JAVA_OPTS - value: -Xms1g -Xmx1g - image: docker.elastic.co/elasticsearch/elasticsearch:8.6.2 - imagePullPolicy: IfNotPresent - name: elasticsearch - ports: - - containerPort: 9200 - protocol: TCP - resources: - limits: - cpu: "2" - memory: 4Gi - ephemeral-storage: 10Gi - requests: - cpu: "2" - memory: 4Gi - ephemeral-storage: 10Gi - volumeMounts: - - mountPath: /usr/share/elasticsearch/data - name: data - volumes: - - emptyDir: { } - name: data diff --git a/versions/karpor/0.4.2/templates/etcd.yml b/versions/karpor/0.4.2/templates/etcd.yml deleted file mode 100644 index d5c325d..0000000 --- a/versions/karpor/0.4.2/templates/etcd.yml +++ /dev/null @@ -1,50 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: etcd - namespace: {{ .Values.namespace }} -spec: - ports: - - port: 2379 - selector: - app: etcd ---- -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: etcd - namespace: {{ .Values.namespace }} -spec: - serviceName: etcd - replicas: 1 - selector: - matchLabels: - app: etcd - template: - metadata: - labels: - app: etcd - spec: - containers: - - name: etcd - image: quay.io/coreos/etcd:v3.5.11 - command: - - /usr/local/bin/etcd - - --listen-client-urls=http://0.0.0.0:2379 - - --advertise-client-urls=http://localhost:2379 - env: - - name: ETCD_DATA_DIR - value: /etcd-data/default.etcd - ports: - - containerPort: 2379 - volumeMounts: - - name: data - mountPath: /etcd-data - volumeClaimTemplates: - - metadata: - name: data - spec: - accessModes: [ "ReadWriteOnce" ] - resources: - requests: - storage: 10Gi diff --git a/versions/karpor/0.4.2/templates/job.yml b/versions/karpor/0.4.2/templates/job.yml deleted file mode 100644 index 6420556..0000000 --- a/versions/karpor/0.4.2/templates/job.yml +++ /dev/null @@ -1,42 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: karpor-generate-cert - namespace: {{ .Values.namespace }} -spec: - ttlSecondsAfterFinished: 300 - template: - spec: - containers: - - name: karpor-generate-cert - image: golang:1.19 - command: - - /bin/sh - - -c - args: - - go install github.com/KusionStack/karpor/hack/cert-generator@latest && cert-generator --ca-name=karpor-secret --kubeconfig-name=karpor-kubeconfig - restartPolicy: OnFailure ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - namespace: {{ .Values.namespace }} - name: karpor-generate-cert -rules: - - apiGroups: [""] - resources: ["secrets", "configmaps"] - verbs: ["*"] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: karpor-generate-cert - namespace: {{ .Values.namespace }} -subjects: - - kind: ServiceAccount - name: default - namespace: {{ .Values.namespace }} -roleRef: - kind: Role - name: karpor-generate-cert - apiGroup: rbac.authorization.k8s.io diff --git a/versions/karpor/0.4.2/templates/karpor-server.yml b/versions/karpor/0.4.2/templates/karpor-server.yml deleted file mode 100644 index d7ca0de..0000000 --- a/versions/karpor/0.4.2/templates/karpor-server.yml +++ /dev/null @@ -1,49 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: karpor-server - namespace: {{ .Values.namespace }} -spec: - ports: - - port: {{ .Values.port }} - selector: - app: karpor-server ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: karpor-server - name: karpor-server - namespace: {{ .Values.namespace }} -spec: - replicas: 1 - selector: - matchLabels: - app: karpor-server - template: - metadata: - labels: - app: karpor-server - spec: - containers: - - args: - - --search-storage-type=elasticsearch - - --elastic-search-addresses=http://elasticsearch.karpor.svc:9200 - - --etcd-servers=http://etcd.karpor.svc:2379 - - --secure-port={{ .Values.port }} - - --client-ca-file=/etc/karpor/ca.crt - command: - - /karpor - image: kusionstack/karpor:{{ .Values.tag }} - name: karpor-server - ports: - - containerPort: {{ .Values.port }} - volumeMounts: - - mountPath: /etc/karpor/ - name: karpor-secret - volumes: - - name: karpor-secret - secret: - defaultMode: 420 - secretName: karpor-secret diff --git a/versions/karpor/0.4.2/templates/karpor-sync.yml b/versions/karpor/0.4.2/templates/karpor-sync.yml deleted file mode 100644 index 8e5c269..0000000 --- a/versions/karpor/0.4.2/templates/karpor-sync.yml +++ /dev/null @@ -1,37 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: karpor-syncer - name: karpor-syncer - namespace: {{ .Values.namespace }} -spec: - replicas: 1 - selector: - matchLabels: - app: karpor-syncer - template: - metadata: - labels: - app: karpor-syncer - spec: - containers: - - command: - - /karpor - args: - - syncer - - --elastic-search-addresses=http://elasticsearch.karpor.svc:9200 - env: - - name: KUBECONFIG - value: /etc/karpor/config - image: kusionstack/karpor:{{ .Values.tag }} - name: karpor-server - ports: - - containerPort: {{ .Values.port }} - volumeMounts: - - mountPath: /etc/karpor/ - name: karpor-kubeconfig - volumes: - - name: karpor-kubeconfig - configMap: - name: karpor-kubeconfig diff --git a/versions/karpor/0.4.2/templates/namespace.yml b/versions/karpor/0.4.2/templates/namespace.yml deleted file mode 100644 index 749f665..0000000 --- a/versions/karpor/0.4.2/templates/namespace.yml +++ /dev/null @@ -1,6 +0,0 @@ -{{- if .Values.namespaceEnabled -}} -apiVersion: v1 -kind: Namespace -metadata: - name: {{ .Values.namespace }} -{{- end }} From 37869e1fd9503ebb1b88bc1faf22b1bc067af95e Mon Sep 17 00:00:00 2001 From: elliotxx <951376975@qq.com> Date: Thu, 18 Jul 2024 17:27:14 +0800 Subject: [PATCH 2/9] refactor: bump karpor chart version --- charts/karpor/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/karpor/Chart.yaml b/charts/karpor/Chart.yaml index 8065b66..11ad093 100644 --- a/charts/karpor/Chart.yaml +++ b/charts/karpor/Chart.yaml @@ -15,7 +15,7 @@ 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.4.2 +version: 0.4.3 # 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 From faa5de56d2bd4147113cea4ae97580bf12129686 Mon Sep 17 00:00:00 2001 From: elliotxx <951376975@qq.com> Date: Thu, 18 Jul 2024 19:54:55 +0800 Subject: [PATCH 3/9] chore: remove invalid minio repo --- .github/configs/ct-lint.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/configs/ct-lint.yaml b/.github/configs/ct-lint.yaml index c5b329f..f272a25 100644 --- a/.github/configs/ct-lint.yaml +++ b/.github/configs/ct-lint.yaml @@ -6,7 +6,6 @@ chart-dirs: - charts chart-repos: - kusionstack=https://kusionstack.github.io/charts - - minio=https://helm.min.io/ - stable=https://charts.helm.sh/stable - incubator=https://charts.helm.sh/incubator helm-extra-args: "--timeout 600s" @@ -14,4 +13,4 @@ validate-chart-schema: false validate-maintainers: true validate-yaml: true exclude-deprecated: true -excluded-charts: [] \ No newline at end of file +excluded-charts: [] From 1578e07bd1fa09d2ca87148ca2aff9398e53fcda Mon Sep 17 00:00:00 2001 From: elliotxx <951376975@qq.com> Date: Thu, 18 Jul 2024 20:13:31 +0800 Subject: [PATCH 4/9] chore: add maintainers to karpor chart --- charts/karpor/Chart.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/charts/karpor/Chart.yaml b/charts/karpor/Chart.yaml index 11ad093..03093ac 100644 --- a/charts/karpor/Chart.yaml +++ b/charts/karpor/Chart.yaml @@ -22,3 +22,7 @@ version: 0.4.3 # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. appVersion: 0.4.2 + +maintainers: + - name: karpor-team + url: https://kusionstack.io/karpor From cdccd346689e325370bad394795ba695bf1a7798 Mon Sep 17 00:00:00 2001 From: elliotxx <951376975@qq.com> Date: Thu, 18 Jul 2024 20:38:33 +0800 Subject: [PATCH 5/9] fix: yaml lint problems --- charts/karpor/Chart.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/karpor/Chart.yaml b/charts/karpor/Chart.yaml index 03093ac..16ca6c3 100644 --- a/charts/karpor/Chart.yaml +++ b/charts/karpor/Chart.yaml @@ -24,5 +24,5 @@ version: 0.4.3 appVersion: 0.4.2 maintainers: - - name: karpor-team - url: https://kusionstack.io/karpor +- name: karpor-team + url: https://kusionstack.io/karpor From 6871d92ce5ff3d98e05c1304782488d95f8e98dc Mon Sep 17 00:00:00 2001 From: elliotxx <951376975@qq.com> Date: Thu, 18 Jul 2024 20:40:24 +0800 Subject: [PATCH 6/9] fix: wrong maintainer --- charts/karpor/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/karpor/Chart.yaml b/charts/karpor/Chart.yaml index 16ca6c3..0e16862 100644 --- a/charts/karpor/Chart.yaml +++ b/charts/karpor/Chart.yaml @@ -24,5 +24,5 @@ version: 0.4.3 appVersion: 0.4.2 maintainers: -- name: karpor-team +- name: kusionstack url: https://kusionstack.io/karpor From c07558e90557da931b6fe1d10aae3abad3e41e38 Mon Sep 17 00:00:00 2001 From: elliotxx <951376975@qq.com> Date: Thu, 18 Jul 2024 21:19:51 +0800 Subject: [PATCH 7/9] chore: add home and icon --- charts/karpor/Chart.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/charts/karpor/Chart.yaml b/charts/karpor/Chart.yaml index 0e16862..0b46d90 100644 --- a/charts/karpor/Chart.yaml +++ b/charts/karpor/Chart.yaml @@ -1,6 +1,8 @@ apiVersion: v2 name: karpor description: A Helm chart for Karpor, a modern kubernetes visualization tool. +home: https://github.com/KusionStack/karpor +icon: https://kusionstack.io/karpor/assets/logo/logo.svg # A chart can be either an 'application' or a 'library' chart. # From f132293b789f213f165ffea6fe86dc0550e5a434 Mon Sep 17 00:00:00 2001 From: elliotxx <951376975@qq.com> Date: Thu, 18 Jul 2024 21:21:28 +0800 Subject: [PATCH 8/9] chore: remove invalid timeout --- .github/configs/ct-lint.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/configs/ct-lint.yaml b/.github/configs/ct-lint.yaml index f272a25..a45d11f 100644 --- a/.github/configs/ct-lint.yaml +++ b/.github/configs/ct-lint.yaml @@ -8,7 +8,6 @@ chart-repos: - kusionstack=https://kusionstack.github.io/charts - stable=https://charts.helm.sh/stable - incubator=https://charts.helm.sh/incubator -helm-extra-args: "--timeout 600s" validate-chart-schema: false validate-maintainers: true validate-yaml: true From af1c30c047551feec23834dcf406e2fd73eb3d9e Mon Sep 17 00:00:00 2001 From: elliotxx <951376975@qq.com> Date: Thu, 18 Jul 2024 21:25:26 +0800 Subject: [PATCH 9/9] chore: remove invalid run chart-testing install --- .github/workflows/lint-anf-test.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint-anf-test.yaml b/.github/workflows/lint-anf-test.yaml index 6e10ead..6add0b2 100644 --- a/.github/workflows/lint-anf-test.yaml +++ b/.github/workflows/lint-anf-test.yaml @@ -46,6 +46,6 @@ jobs: with: config: .github/configs/kind-config.yaml - - name: Run chart-testing (install) - run: ct install --config ./.github/configs/ct-install.yaml - if: steps.list-changed.outputs.changed == 'true' \ No newline at end of file + # - name: Run chart-testing (install) + # run: ct install --config ./.github/configs/ct-install.yaml + # if: steps.list-changed.outputs.changed == 'true'