From 7ef77d4b00fb17f3ec17f60af2fdd36e0feffe95 Mon Sep 17 00:00:00 2001 From: Plenty Su Date: Mon, 26 Feb 2024 18:45:45 +0900 Subject: [PATCH 01/12] Remove the previous Helm chart for scalar-manager --- charts/scalar-manager/.helmignore | 23 ------ charts/scalar-manager/Chart.yaml | 19 ----- charts/scalar-manager/README.md | 28 ------- charts/scalar-manager/README.md.gotmpl | 12 --- charts/scalar-manager/templates/_helpers.tpl | 62 --------------- .../scalar-manager/templates/deployment.yaml | 58 -------------- charts/scalar-manager/templates/role.yaml | 9 --- .../scalar-manager/templates/rolebinding.yaml | 13 --- charts/scalar-manager/templates/service.yaml | 16 ---- .../templates/serviceaccount.yaml | 9 --- charts/scalar-manager/values.schema.json | 79 ------------------- charts/scalar-manager/values.yaml | 52 ------------ 12 files changed, 380 deletions(-) delete mode 100644 charts/scalar-manager/.helmignore delete mode 100644 charts/scalar-manager/Chart.yaml delete mode 100644 charts/scalar-manager/README.md delete mode 100644 charts/scalar-manager/README.md.gotmpl delete mode 100644 charts/scalar-manager/templates/_helpers.tpl delete mode 100644 charts/scalar-manager/templates/deployment.yaml delete mode 100644 charts/scalar-manager/templates/role.yaml delete mode 100644 charts/scalar-manager/templates/rolebinding.yaml delete mode 100644 charts/scalar-manager/templates/service.yaml delete mode 100644 charts/scalar-manager/templates/serviceaccount.yaml delete mode 100644 charts/scalar-manager/values.schema.json delete mode 100644 charts/scalar-manager/values.yaml diff --git a/charts/scalar-manager/.helmignore b/charts/scalar-manager/.helmignore deleted file mode 100644 index 0e8a0eb3..00000000 --- a/charts/scalar-manager/.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/charts/scalar-manager/Chart.yaml b/charts/scalar-manager/Chart.yaml deleted file mode 100644 index 96080ea6..00000000 --- a/charts/scalar-manager/Chart.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: v2 -name: scalar-manager -description: Scalar Manager -type: application -version: 2.0.0-SNAPSHOT -appVersion: 2.0.0-SNAPSHOT -deprecated: false -keywords: -- scalardb -- scalardl -- scalar-manager -home: https://scalar-labs.com/ -sources: - - https://github.com/scalar-labs/scalar-manager -maintainers: - - name: Takanori Yokoyama - email: takanori.yokoyama@scalar-labs.com - - name: Plenty Su - email: plenty.su@scalar-labs.com diff --git a/charts/scalar-manager/README.md b/charts/scalar-manager/README.md deleted file mode 100644 index d19b6458..00000000 --- a/charts/scalar-manager/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# scalar-manager - -![Version: 2.0.0-SNAPSHOT](https://img.shields.io/badge/Version-2.0.0--SNAPSHOT-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.0.0-SNAPSHOT](https://img.shields.io/badge/AppVersion-2.0.0--SNAPSHOT-informational?style=flat-square) - -Scalar Manager -Current chart version is `2.0.0-SNAPSHOT` - -**Homepage:** - -## Values - -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| fullnameOverride | string | `""` | Override the fully qualified app name | -| image.pullPolicy | string | `"IfNotPresent"` | Specify a imagePullPolicy | -| image.repository | string | `"ghcr.io/scalar-labs/scalar-manager"` | Docker image | -| image.tag | string | `""` | Override the image tag whose default is the chart appVersion | -| imagePullSecrets | list | `[{"name":"reg-docker-secrets"}]` | Optionally specify an array of imagePullSecrets. Secrets must be manually created in the namespace | -| nameOverride | string | `""` | Override the Chart name | -| replicaCount | int | `1` | number of replicas to deploy | -| scalarManager.grafanaUrl | string | `""` | | -| scalarManager.port | int | `5000` | The port that Scalar Manager container exposes | -| scalarManager.refreshInterval | int | `30` | | -| scalarManager.targets | list | `[]` | | -| service.port | int | `8000` | The port that service exposes | -| service.type | string | `"ClusterIP"` | The service type | -| serviceAccount.automountServiceAccountToken | bool | `true` | Specify to mount a service account token or not | -| serviceAccount.serviceAccountName | string | `""` | Name of the existing service account resource | diff --git a/charts/scalar-manager/README.md.gotmpl b/charts/scalar-manager/README.md.gotmpl deleted file mode 100644 index e41d4ff6..00000000 --- a/charts/scalar-manager/README.md.gotmpl +++ /dev/null @@ -1,12 +0,0 @@ -{{ template "chart.header" . }} - -{{ template "chart.versionBadge" . }} {{ template "chart.typeBadge" . }} {{ template "chart.appVersionBadge" . }} - -{{ template "chart.description" . }} -Current chart version is `{{ template "chart.version" . }}` - -**Homepage:** - -{{ template "chart.requirementsSection" . }} - -{{ template "chart.valuesSection" . }} diff --git a/charts/scalar-manager/templates/_helpers.tpl b/charts/scalar-manager/templates/_helpers.tpl deleted file mode 100644 index 2cee60f2..00000000 --- a/charts/scalar-manager/templates/_helpers.tpl +++ /dev/null @@ -1,62 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "scalar-manager.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "scalar-manager.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "scalar-manager.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "scalar-manager.labels" -}} -helm.sh/chart: {{ include "scalar-manager.chart" . }} -{{ include "scalar-manager.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "scalar-manager.selectorLabels" -}} -app.kubernetes.io/name: {{ include "scalar-manager.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "scalar-manager.serviceAccountName" -}} -{{- if .Values.serviceAccount.serviceAccountName }} -{{- .Values.serviceAccount.serviceAccountName }} -{{- else }} -{{- print (include "scalar-manager.fullname" .) "-sa" | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} diff --git a/charts/scalar-manager/templates/deployment.yaml b/charts/scalar-manager/templates/deployment.yaml deleted file mode 100644 index d103763a..00000000 --- a/charts/scalar-manager/templates/deployment.yaml +++ /dev/null @@ -1,58 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - namespace: {{ .Release.Namespace }} - name: {{ include "scalar-manager.fullname" . }} - labels: - {{- include "scalar-manager.labels" . | nindent 4 }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - {{- include "scalar-manager.selectorLabels" . | nindent 6 }} - template: - metadata: - labels: - {{- include "scalar-manager.selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "scalar-manager.serviceAccountName" . }} - automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - ports: - - containerPort: {{ .Values.scalarManager.port }} - env: - - name: PORT - value: "{{ .Values.scalarManager.port }}" - {{- range $i, $target := .Values.scalarManager.targets }} - - name: TARGET_NAME_{{ $i }} - value: {{ $target.name | default $i }} - - name: TARGET_ADMIN_SRV_{{ $i }} - value: {{ $target.adminSrv | default $i }} - - name: TARGET_DATABASE_TYPE_{{ $i }} - value: {{ $target.databaseType| default $i }} - {{ end }} - - name: GRAFANA_URL - value: {{ .Values.scalarManager.grafanaUrl | default "" }} - - name: REFRESH_INTERVAL - value: "{{ .Values.scalarManager.refreshInterval }}" - startupProbe: - httpGet: - path: /health - port: {{ .Values.scalarManager.port }} - failureThreshold: 60 - periodSeconds: 5 - livenessProbe: - httpGet: - path: /health - port: {{ .Values.scalarManager.port }} - failureThreshold: 3 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 1 diff --git a/charts/scalar-manager/templates/role.yaml b/charts/scalar-manager/templates/role.yaml deleted file mode 100644 index 00194254..00000000 --- a/charts/scalar-manager/templates/role.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - namespace: {{ .Release.Namespace }} - name: {{ include "scalar-manager.fullname" . }}-role -rules: -- apiGroups: [""] - resources: ["endpoints"] - verbs: ["get"] diff --git a/charts/scalar-manager/templates/rolebinding.yaml b/charts/scalar-manager/templates/rolebinding.yaml deleted file mode 100644 index fe896d0d..00000000 --- a/charts/scalar-manager/templates/rolebinding.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - namespace: {{ .Release.Namespace }} - name: {{ include "scalar-manager.fullname" . }}-rolebinding -subjects: -- kind: ServiceAccount - name: {{ include "scalar-manager.serviceAccountName" . }} - apiGroup: "" -roleRef: - kind: Role - name: {{ include "scalar-manager.fullname" . }}-role - apiGroup: rbac.authorization.k8s.io diff --git a/charts/scalar-manager/templates/service.yaml b/charts/scalar-manager/templates/service.yaml deleted file mode 100644 index 4f14ee7f..00000000 --- a/charts/scalar-manager/templates/service.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - namespace: {{ .Release.Namespace }} - name: {{ include "scalar-manager.fullname" . }} - labels: - {{- include "scalar-manager.labels" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: {{ .Values.scalarManager.port }} - protocol: TCP - name: http - selector: - {{- include "scalar-manager.selectorLabels" . | nindent 4 }} diff --git a/charts/scalar-manager/templates/serviceaccount.yaml b/charts/scalar-manager/templates/serviceaccount.yaml deleted file mode 100644 index 159688a7..00000000 --- a/charts/scalar-manager/templates/serviceaccount.yaml +++ /dev/null @@ -1,9 +0,0 @@ -{{- if not .Values.serviceAccount.serviceAccountName }} -apiVersion: v1 -kind: ServiceAccount -metadata: - namespace: {{ .Release.Namespace }} - name: {{ include "scalar-manager.serviceAccountName" . }} - labels: - {{- include "scalar-manager.labels" . | nindent 4 }} -{{- end }} diff --git a/charts/scalar-manager/values.schema.json b/charts/scalar-manager/values.schema.json deleted file mode 100644 index ccb0b8ba..00000000 --- a/charts/scalar-manager/values.schema.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema#", - "type": "object", - "properties": { - "fullnameOverride": { - "type": "string" - }, - "image": { - "type": "object", - "properties": { - "pullPolicy": { - "type": "string" - }, - "repository": { - "type": "string" - }, - "tag": { - "type": "string" - } - } - }, - "imagePullSecrets": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - } - } - }, - "nameOverride": { - "type": "string" - }, - "replicaCount": { - "type": "integer" - }, - "scalarManager": { - "type": "object", - "properties": { - "grafanaUrl": { - "type": "string" - }, - "port": { - "type": "integer" - }, - "refreshInterval": { - "type": "integer" - }, - "targets": { - "type": "array" - } - } - }, - "service": { - "type": "object", - "properties": { - "port": { - "type": "integer" - }, - "type": { - "type": "string" - } - } - }, - "serviceAccount": { - "type": "object", - "properties": { - "automountServiceAccountToken": { - "type": "boolean" - }, - "serviceAccountName": { - "type": "string" - } - } - } - } -} diff --git a/charts/scalar-manager/values.yaml b/charts/scalar-manager/values.yaml deleted file mode 100644 index 6c972c6e..00000000 --- a/charts/scalar-manager/values.yaml +++ /dev/null @@ -1,52 +0,0 @@ -# replicaCount -- number of replicas to deploy -replicaCount: 1 - -image: - # image.repository -- Docker image - repository: ghcr.io/scalar-labs/scalar-manager - # image.pullPolicy -- Specify a imagePullPolicy - pullPolicy: IfNotPresent - # image.tag -- Override the image tag whose default is the chart appVersion - tag: "" - -# imagePullSecrets -- Optionally specify an array of imagePullSecrets. Secrets must be manually created in the namespace -imagePullSecrets: - - name: reg-docker-secrets - -# nameOverride -- Override the Chart name -nameOverride: "" - -# fullnameOverride -- Override the fully qualified app name -fullnameOverride: "" - -serviceAccount: - # serviceAccount.serviceAccountName -- Name of the existing service account resource - serviceAccountName: "" - # serviceAccount.automountServiceAccountToken -- Specify to mount a service account token or not - automountServiceAccountToken: true - -service: - # service.type -- The service type - type: ClusterIP - # service.port -- The port that service exposes - port: 8000 - -scalarManager: - # scalarManager.port -- The port that Scalar Manager container exposes - port: 5000 - - # targets -- The targets that Scalar Manager should monitor - targets: [] - # targets: # example - # - name: Ledger - # adminSrv: _scalardl-admin._tcp.scalardl-headless.default.svc.cluster.local - # databaseType: cassandra - # - name: Auditor - # adminSrv: _scalardl-auditor-admin._tcp.scalardl-auditor-headless.default.svc.cluster.local - # databaseType: cassandra - - # grafanaUrl -- The URL where Grafana can be accessable in public - grafanaUrl: "" - - # refreshInterval -- The interval that Scalar Manager refresh the status of the monitoring targets - refreshInterval: 30 From f853e93e6f8a32e53a84d44761f0a37192302a0e Mon Sep 17 00:00:00 2001 From: Plenty Su Date: Tue, 27 Feb 2024 17:06:52 +0900 Subject: [PATCH 02/12] Create new Helm chart for Scalar Manager --- charts/scalar-manager/.helmignore | 23 +++ charts/scalar-manager/Chart.yaml | 23 +++ charts/scalar-manager/README.md | 50 ++++++ charts/scalar-manager/README.md.gotmpl | 12 ++ charts/scalar-manager/templates/_helpers.tpl | 62 +++++++ .../templates/scalar-manager/clusterrole.yaml | 10 ++ .../scalar-manager/clusterrolebinding.yaml | 15 ++ .../templates/scalar-manager/configmap.yaml | 12 ++ .../templates/scalar-manager/deployment.yaml | 101 ++++++++++++ .../templates/scalar-manager/service.yaml | 16 ++ .../scalar-manager/serviceaccount.yaml | 7 + charts/scalar-manager/values.schema.json | 155 ++++++++++++++++++ charts/scalar-manager/values.yaml | 89 ++++++++++ 13 files changed, 575 insertions(+) create mode 100644 charts/scalar-manager/.helmignore create mode 100644 charts/scalar-manager/Chart.yaml create mode 100644 charts/scalar-manager/README.md create mode 100644 charts/scalar-manager/README.md.gotmpl create mode 100644 charts/scalar-manager/templates/_helpers.tpl create mode 100644 charts/scalar-manager/templates/scalar-manager/clusterrole.yaml create mode 100644 charts/scalar-manager/templates/scalar-manager/clusterrolebinding.yaml create mode 100644 charts/scalar-manager/templates/scalar-manager/configmap.yaml create mode 100644 charts/scalar-manager/templates/scalar-manager/deployment.yaml create mode 100644 charts/scalar-manager/templates/scalar-manager/service.yaml create mode 100644 charts/scalar-manager/templates/scalar-manager/serviceaccount.yaml create mode 100644 charts/scalar-manager/values.schema.json create mode 100644 charts/scalar-manager/values.yaml diff --git a/charts/scalar-manager/.helmignore b/charts/scalar-manager/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/charts/scalar-manager/.helmignore @@ -0,0 +1,23 @@ +# 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/charts/scalar-manager/Chart.yaml b/charts/scalar-manager/Chart.yaml new file mode 100644 index 00000000..71d6c933 --- /dev/null +++ b/charts/scalar-manager/Chart.yaml @@ -0,0 +1,23 @@ +apiVersion: v2 +name: scalar-manager +description: Scalar Manager +type: application +version: 2.0.0-SNAPSHOT +appVersion: 2.0.0-SNAPSHOT +deprecated: false +icon: https://scalar-labs.com/wp-content/themes/scalar/assets/img/logo_scalar.svg +keywords: + - scalar-manager + - scalardb-cluster + - scalardl-ledger + - scalardl-auditor + - scalar-admin-for-kubernetes +home: https://scalar-labs.com/ +sources: + - https://github.com/scalar-labs/scalar-manager-api + - https://github.com/scalar-labs/scalar-manager-web +maintainers: + - name: Takanori Yokoyama + email: takanori.yokoyama@scalar-labs.com + - name: Plenty Su + email: plenty.su@scalar-labs.com diff --git a/charts/scalar-manager/README.md b/charts/scalar-manager/README.md new file mode 100644 index 00000000..a11926e8 --- /dev/null +++ b/charts/scalar-manager/README.md @@ -0,0 +1,50 @@ +# scalar-manager + +![Version: 2.0.0-SNAPSHOT](https://img.shields.io/badge/Version-2.0.0--SNAPSHOT-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.0.0-SNAPSHOT](https://img.shields.io/badge/AppVersion-2.0.0--SNAPSHOT-informational?style=flat-square) + +Scalar Manager +Current chart version is `2.0.0-SNAPSHOT` + +**Homepage:** + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| api.grafanaKubernetesServiceLabelName | string | `"app.kubernetes.io/name"` | | +| api.grafanaKubernetesServiceLabelValue | string | `"grafana"` | | +| api.grafanaKubernetesServicePortName | string | `"http-web"` | | +| api.helmScalarAdminForKubernetesChartName | string | `"scalar-admin-for-kubernetes"` | | +| api.helmScalarAdminForKubernetesChartVersion | string | `"1.0.0"` | | +| api.helmScalarRepositoryName | string | `"scalar-labs"` | | +| api.helmScalarRepositoryUrl | string | `"https://scalar-labs.github.io/helm-charts"` | | +| api.image.pullPolicy | string | `"IfNotPresent"` | | +| api.image.repository | string | `"ghcr.io/scalar-labs/scalar-manager-api"` | | +| api.image.tag | string | `""` | | +| api.lokiKubernetesServiceLabelName | string | `"app"` | | +| api.lokiKubernetesServiceLabelValue | string | `"loki"` | | +| api.lokiKubernetesServicePortName | string | `"http-metrics"` | | +| api.pausedStateRetentionMaxNumber | string | `"100"` | | +| api.pausedStateRetentionStorage | string | `"configmap"` | | +| api.prometheusKubernetesServiceLabelName | string | `"app"` | | +| api.prometheusKubernetesServiceLabelValue | string | `"kube-prometheus-stack-prometheus"` | | +| api.prometheusKubernetesServicePortName | string | `"http-web"` | | +| fullnameOverride | string | `""` | | +| imagePullSecrets[0].name | string | `"reg-docker-secrets"` | | +| nameOverride | string | `""` | | +| nodeSelector | object | `{}` | | +| podAnnotations | object | `{}` | | +| podLabels | object | `{}` | | +| podSecurityContext | object | `{}` | | +| replicaCount | int | `1` | | +| resources | object | `{}` | | +| securityContext | object | `{}` | | +| service.port | int | `80` | | +| service.type | string | `"LoadBalancer"` | | +| serviceAccount.automount | bool | `true` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `""` | | +| tolerations | list | `[]` | | +| web.image.pullPolicy | string | `"IfNotPresent"` | | +| web.image.repository | string | `"ghcr.io/scalar-labs/scalar-manager-web"` | | +| web.image.tag | string | `""` | | diff --git a/charts/scalar-manager/README.md.gotmpl b/charts/scalar-manager/README.md.gotmpl new file mode 100644 index 00000000..e41d4ff6 --- /dev/null +++ b/charts/scalar-manager/README.md.gotmpl @@ -0,0 +1,12 @@ +{{ template "chart.header" . }} + +{{ template "chart.versionBadge" . }} {{ template "chart.typeBadge" . }} {{ template "chart.appVersionBadge" . }} + +{{ template "chart.description" . }} +Current chart version is `{{ template "chart.version" . }}` + +**Homepage:** + +{{ template "chart.requirementsSection" . }} + +{{ template "chart.valuesSection" . }} diff --git a/charts/scalar-manager/templates/_helpers.tpl b/charts/scalar-manager/templates/_helpers.tpl new file mode 100644 index 00000000..b3d9dd53 --- /dev/null +++ b/charts/scalar-manager/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "scalar-manager.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "scalar-manager.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "scalar-manager.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "scalar-manager.labels" -}} +helm.sh/chart: {{ include "scalar-manager.chart" . }} +{{ include "scalar-manager.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "scalar-manager.selectorLabels" -}} +app.kubernetes.io/name: {{ include "scalar-manager.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "scalar-manager.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "scalar-manager.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/charts/scalar-manager/templates/scalar-manager/clusterrole.yaml b/charts/scalar-manager/templates/scalar-manager/clusterrole.yaml new file mode 100644 index 00000000..c988e9e2 --- /dev/null +++ b/charts/scalar-manager/templates/scalar-manager/clusterrole.yaml @@ -0,0 +1,10 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ include "scalar-manager.fullname" . }} + labels: + {{- include "scalar-manager.labels" . | nindent 4 }} +rules: + - apiGroups: ["", "apps", "batch", "rbac.authorization.k8s.io"] + resources: ["pods", "deployments", "services", "namespaces", "configmaps", "secrets", "cronjobs", "serviceaccounts", "roles", "rolebindings", "jobs"] + verbs: ["get", "list", "create", "patch", "delete", "update"] diff --git a/charts/scalar-manager/templates/scalar-manager/clusterrolebinding.yaml b/charts/scalar-manager/templates/scalar-manager/clusterrolebinding.yaml new file mode 100644 index 00000000..fb1b66f2 --- /dev/null +++ b/charts/scalar-manager/templates/scalar-manager/clusterrolebinding.yaml @@ -0,0 +1,15 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ include "scalar-manager.fullname" . }} + labels: + {{- include "scalar-manager.labels" . | nindent 4 }} +subjects: + - kind: ServiceAccount + name: {{ include "scalar-manager.fullname" . }} + namespace: {{ .Release.Namespace }} + apiGroup: "" +roleRef: + kind: ClusterRole + name: {{ include "scalar-manager.fullname" . }} + apiGroup: rbac.authorization.k8s.io diff --git a/charts/scalar-manager/templates/scalar-manager/configmap.yaml b/charts/scalar-manager/templates/scalar-manager/configmap.yaml new file mode 100644 index 00000000..d58dac26 --- /dev/null +++ b/charts/scalar-manager/templates/scalar-manager/configmap.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "scalar-manager.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/app: {{ include "scalar-manager.fullname" . }} + {{- include "scalar-manager.labels" . | nindent 4 }} +data: + managed-clusters: "[]" + paused-states: "[]" + paused-states-updated-at: "0" diff --git a/charts/scalar-manager/templates/scalar-manager/deployment.yaml b/charts/scalar-manager/templates/scalar-manager/deployment.yaml new file mode 100644 index 00000000..6f847fed --- /dev/null +++ b/charts/scalar-manager/templates/scalar-manager/deployment.yaml @@ -0,0 +1,101 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "scalar-manager.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + {{- include "scalar-manager.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "scalar-manager.selectorLabels" . | nindent 6 }} + template: + metadata: + annotations: + checksum/config: {{ include (print $.Template.BasePath "/scalar-manager/configmap.yaml") . | sha256sum }} + {{- if .Values.podAnnotations }} + {{- toYaml .Values.podAnnotations | nindent 8 }} + {{- end }} + labels: + {{- include "scalar-manager.selectorLabels" . | nindent 8 }} + {{- if .Values.podLabels }} + {{- toYaml .Values.podLabels | nindent 8 }} + {{- end }} + spec: + restartPolicy: Always + serviceAccountName: {{ include "scalar-manager.serviceAccountName" . }} + automountServiceAccountToken: {{ .Values.serviceAccount.automount }} + terminationGracePeriodSeconds: 90 + containers: + - name: {{ .Chart.Name }}-api + image: "{{ .Values.api.image.repository }}:{{ .Values.api.image.tag | default .Chart.AppVersion }}" + resources: + {{- toYaml .Values.resources | nindent 12 }} + ports: + - containerPort: 8080 + imagePullPolicy: {{ .Values.api.image.pullPolicy }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + env: + - name: GRAFANA_KUBERNETES_SERVICE_LABEL_NAME + value: {{ .Values.api.grafanaKubernetesServiceLabelName | quote }} + - name: GRAFANA_KUBERNETES_SERVICE_LABEL_VALUE + value: {{ .Values.api.grafanaKubernetesServiceLabelValue | quote }} + - name: GRAFANA_KUBERNETES_SERVICE_PORT_NAME + value: {{ .Values.api.grafanaKubernetesServicePortName | quote }} + - name: PROMETHEUS_KUBERNETES_SERVICE_LABEL_NAME + value: {{ .Values.api.prometheusKubernetesServiceLabelName | quote }} + - name: PROMETHEUS_KUBERNETES_SERVICE_LABEL_VALUE + value: {{ .Values.api.prometheusKubernetesServiceLabelValue | quote }} + - name: PROMETHEUS_KUBERNETES_SERVICE_PORT_NAME + value: {{ .Values.api.prometheusKubernetesServicePortName | quote }} + - name: LOKI_KUBERNETES_SERVICE_LABEL_NAME + value: {{ .Values.api.lokiKubernetesServiceLabelName | quote }} + - name: LOKI_KUBERNETES_SERVICE_LABEL_VALUE + value: {{ .Values.api.lokiKubernetesServiceLabelValue | quote }} + - name: LOKI_KUBERNETES_SERVICE_PORT_NAME + value: {{ .Values.api.lokiKubernetesServicePortName | quote }} + - name: HELM_SCALAR_REPOSITORY_NAME + value: {{ .Values.api.helmScalarRepositoryName | quote }} + - name: HELM_SCALAR_REPOSITORY_URL + value: {{ .Values.api.helmScalarRepositoryUrl | quote }} + - name: HELM_SCALAR_ADMIN_FOR_KUBERNETES_CHART_NAME + value: {{ .Values.api.helmScalarAdminForKubernetesChartName | quote }} + - name : HELM_SCALAR_ADMIN_FOR_KUBERNETES_CHART_VERSION + value: {{ .Values.api.helmScalarAdminForKubernetesChartVersion | quote }} + - name: CONFIG_MAP_LABEL_NAME + value: "app.kubernetes.io/app" + - name: CONFIG_MAP_LABEL_VALUE + value: {{ include "scalar-manager.fullname" . | quote }} + - name: PAUSED_STATE_RETENTION_STORAGE + value: {{ .Values.api.pausedStateRetentionStorage | quote }} + - name: PAUSED_STATE_RETENTION_MAX_NUMBER + value: {{ .Values.api.pausedStateRetentionMaxNumber | quote }} + - name: {{ .Chart.Name }}-web + image: "{{ .Values.web.image.repository }}:{{ .Values.web.image.tag | default .Chart.AppVersion }}" + resources: + {{- toYaml .Values.resources | nindent 12 }} + ports: + - containerPort: 3000 + imagePullPolicy: {{ .Values.web.image.pullPolicy }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/scalar-manager/templates/scalar-manager/service.yaml b/charts/scalar-manager/templates/scalar-manager/service.yaml new file mode 100644 index 00000000..eea2cf3d --- /dev/null +++ b/charts/scalar-manager/templates/scalar-manager/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "scalar-manager.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + {{- include "scalar-manager.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - protocol: TCP + name: web + port: {{ .Values.service.port }} + targetPort: 3000 + selector: + {{- include "scalar-manager.selectorLabels" . | nindent 4 }} diff --git a/charts/scalar-manager/templates/scalar-manager/serviceaccount.yaml b/charts/scalar-manager/templates/scalar-manager/serviceaccount.yaml new file mode 100644 index 00000000..c1a96476 --- /dev/null +++ b/charts/scalar-manager/templates/scalar-manager/serviceaccount.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "scalar-manager.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} + labels: + {{- include "scalar-manager.labels" . | nindent 4 }} diff --git a/charts/scalar-manager/values.schema.json b/charts/scalar-manager/values.schema.json new file mode 100644 index 00000000..58130444 --- /dev/null +++ b/charts/scalar-manager/values.schema.json @@ -0,0 +1,155 @@ +{ + "$schema": "http://json-schema.org/schema#", + "type": "object", + "properties": { + "api": { + "type": "object", + "properties": { + "grafanaKubernetesServiceLabelName": { + "type": "string" + }, + "grafanaKubernetesServiceLabelValue": { + "type": "string" + }, + "grafanaKubernetesServicePortName": { + "type": "string" + }, + "helmScalarAdminForKubernetesChartName": { + "type": "string" + }, + "helmScalarAdminForKubernetesChartVersion": { + "type": "string" + }, + "helmScalarRepositoryName": { + "type": "string" + }, + "helmScalarRepositoryUrl": { + "type": "string" + }, + "image": { + "type": "object", + "properties": { + "pullPolicy": { + "type": "string" + }, + "repository": { + "type": "string" + }, + "tag": { + "type": "string" + } + } + }, + "lokiKubernetesServiceLabelName": { + "type": "string" + }, + "lokiKubernetesServiceLabelValue": { + "type": "string" + }, + "lokiKubernetesServicePortName": { + "type": "string" + }, + "pausedStateRetentionMaxNumber": { + "type": "string" + }, + "pausedStateRetentionStorage": { + "type": "string" + }, + "prometheusKubernetesServiceLabelName": { + "type": "string" + }, + "prometheusKubernetesServiceLabelValue": { + "type": "string" + }, + "prometheusKubernetesServicePortName": { + "type": "string" + } + } + }, + "fullnameOverride": { + "type": "string" + }, + "imagePullSecrets": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + } + }, + "nameOverride": { + "type": "string" + }, + "nodeSelector": { + "type": "object" + }, + "podAnnotations": { + "type": "object" + }, + "podLabels": { + "type": "object" + }, + "podSecurityContext": { + "type": "object" + }, + "replicaCount": { + "type": "integer" + }, + "resources": { + "type": "object" + }, + "securityContext": { + "type": "object" + }, + "service": { + "type": "object", + "properties": { + "port": { + "type": "integer" + }, + "type": { + "type": "string" + } + } + }, + "serviceAccount": { + "type": "object", + "properties": { + "automount": { + "type": "boolean" + }, + "create": { + "type": "boolean" + }, + "name": { + "type": "string" + } + } + }, + "tolerations": { + "type": "array" + }, + "web": { + "type": "object", + "properties": { + "image": { + "type": "object", + "properties": { + "pullPolicy": { + "type": "string" + }, + "repository": { + "type": "string" + }, + "tag": { + "type": "string" + } + } + } + } + } + } +} diff --git a/charts/scalar-manager/values.yaml b/charts/scalar-manager/values.yaml new file mode 100644 index 00000000..a3c1fc33 --- /dev/null +++ b/charts/scalar-manager/values.yaml @@ -0,0 +1,89 @@ +# Default values for scalar-manager. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. +replicaCount: 1 + +nameOverride: "" + +fullnameOverride: "" + +podAnnotations: {} + +podLabels: {} + +podSecurityContext: + {} + # fsGroup: 2000 + +securityContext: + {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +nodeSelector: {} + +tolerations: [] + +service: + type: LoadBalancer + port: 80 + +serviceAccount: + # Specifies whether a service account should be created + create: true + + # Automatically mount a ServiceAccount's API credentials? + automount: true + + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +api: + image: + repository: ghcr.io/scalar-labs/scalar-manager-api + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "" + grafanaKubernetesServiceLabelName: "app.kubernetes.io/name" + grafanaKubernetesServiceLabelValue: "grafana" + grafanaKubernetesServicePortName: "http-web" + prometheusKubernetesServiceLabelName: "app" + prometheusKubernetesServiceLabelValue: "kube-prometheus-stack-prometheus" + prometheusKubernetesServicePortName: "http-web" + lokiKubernetesServiceLabelName: "app" + lokiKubernetesServiceLabelValue: "loki" + lokiKubernetesServicePortName: "http-metrics" + helmScalarRepositoryName: "scalar-labs" + helmScalarRepositoryUrl: "https://scalar-labs.github.io/helm-charts" + helmScalarAdminForKubernetesChartName: "scalar-admin-for-kubernetes" + helmScalarAdminForKubernetesChartVersion: "1.0.0" + pausedStateRetentionStorage: "configmap" + pausedStateRetentionMaxNumber: "100" + +web: + image: + repository: ghcr.io/scalar-labs/scalar-manager-web + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "" + +imagePullSecrets: + - name: reg-docker-secrets + +resources: + {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi From 31825192575f7b16e40e81af516a6dc1369b2e56 Mon Sep 17 00:00:00 2001 From: Plenty Su Date: Thu, 2 May 2024 01:02:38 +0900 Subject: [PATCH 03/12] Separate role rules by API group --- .../templates/scalar-manager/clusterrole.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/charts/scalar-manager/templates/scalar-manager/clusterrole.yaml b/charts/scalar-manager/templates/scalar-manager/clusterrole.yaml index c988e9e2..1ab7f689 100644 --- a/charts/scalar-manager/templates/scalar-manager/clusterrole.yaml +++ b/charts/scalar-manager/templates/scalar-manager/clusterrole.yaml @@ -5,6 +5,15 @@ metadata: labels: {{- include "scalar-manager.labels" . | nindent 4 }} rules: - - apiGroups: ["", "apps", "batch", "rbac.authorization.k8s.io"] - resources: ["pods", "deployments", "services", "namespaces", "configmaps", "secrets", "cronjobs", "serviceaccounts", "roles", "rolebindings", "jobs"] + - apiGroups: [""] + resources: ["pods", "services", "namespaces", "configmaps", "secrets", "serviceaccounts"] verbs: ["get", "list", "create", "patch", "delete", "update"] + - apiGroups: ["batch"] + resources: ["cronjobs", "jobs"] + verbs: ["get", "list", "create", "delete"] + - apiGroups: ["apps"] + resources: ["deployments"] + verbs: ["get", "list"] + - apiGroups: ["rbac.authorization.k8s.io"] + resources: ["roles", "rolebindings"] + verbs: ["get", "list", "create", "delete"] From d9991a4bbfa32e17b07a4f223df7c2807153f695 Mon Sep 17 00:00:00 2001 From: Plenty Su Date: Mon, 6 May 2024 22:59:27 +0900 Subject: [PATCH 04/12] Don't create service account if it's specified --- .../scalar-manager/templates/scalar-manager/serviceaccount.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/charts/scalar-manager/templates/scalar-manager/serviceaccount.yaml b/charts/scalar-manager/templates/scalar-manager/serviceaccount.yaml index c1a96476..a3844c71 100644 --- a/charts/scalar-manager/templates/scalar-manager/serviceaccount.yaml +++ b/charts/scalar-manager/templates/scalar-manager/serviceaccount.yaml @@ -1,3 +1,4 @@ +{{- if not .Values.serviceAccount.name }} apiVersion: v1 kind: ServiceAccount metadata: @@ -5,3 +6,4 @@ metadata: namespace: {{ .Release.Namespace }} labels: {{- include "scalar-manager.labels" . | nindent 4 }} +{{- end }} From 1e1f69050530080248c12e325419cbaa979587c4 Mon Sep 17 00:00:00 2001 From: Plenty Su Date: Mon, 6 May 2024 23:53:23 +0900 Subject: [PATCH 05/12] Correct the service account name in role binding --- .../templates/scalar-manager/clusterrolebinding.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/scalar-manager/templates/scalar-manager/clusterrolebinding.yaml b/charts/scalar-manager/templates/scalar-manager/clusterrolebinding.yaml index fb1b66f2..ee1a4ffa 100644 --- a/charts/scalar-manager/templates/scalar-manager/clusterrolebinding.yaml +++ b/charts/scalar-manager/templates/scalar-manager/clusterrolebinding.yaml @@ -6,7 +6,7 @@ metadata: {{- include "scalar-manager.labels" . | nindent 4 }} subjects: - kind: ServiceAccount - name: {{ include "scalar-manager.fullname" . }} + name: {{ include "scalar-manager.serviceAccountName" . }} namespace: {{ .Release.Namespace }} apiGroup: "" roleRef: From aeb8ee4267a46477e90196b78e3f42e6e469bb96 Mon Sep 17 00:00:00 2001 From: Plenty Su Date: Fri, 10 May 2024 20:05:24 +0900 Subject: [PATCH 06/12] Revise the chart template according to the feedback --- charts/scalar-manager/README.md | 32 ++---- charts/scalar-manager/templates/_helpers.tpl | 7 +- .../templates/scalar-manager/configmap.yaml | 10 +- .../templates/scalar-manager/deployment.yaml | 51 ++------- .../scalar-manager/serviceaccount.yaml | 2 +- charts/scalar-manager/values.schema.json | 91 +++++++-------- charts/scalar-manager/values.yaml | 106 ++++++++++-------- 7 files changed, 128 insertions(+), 171 deletions(-) diff --git a/charts/scalar-manager/README.md b/charts/scalar-manager/README.md index a11926e8..6ad7bcec 100644 --- a/charts/scalar-manager/README.md +++ b/charts/scalar-manager/README.md @@ -11,40 +11,28 @@ Current chart version is `2.0.0-SNAPSHOT` | Key | Type | Default | Description | |-----|------|---------|-------------| -| api.grafanaKubernetesServiceLabelName | string | `"app.kubernetes.io/name"` | | -| api.grafanaKubernetesServiceLabelValue | string | `"grafana"` | | -| api.grafanaKubernetesServicePortName | string | `"http-web"` | | -| api.helmScalarAdminForKubernetesChartName | string | `"scalar-admin-for-kubernetes"` | | -| api.helmScalarAdminForKubernetesChartVersion | string | `"1.0.0"` | | -| api.helmScalarRepositoryName | string | `"scalar-labs"` | | -| api.helmScalarRepositoryUrl | string | `"https://scalar-labs.github.io/helm-charts"` | | +| api.applicationProperties | string | `"grafana.kubernetesServiceLabelName=${GRAFANA_KUBERNETES_SERVICE_LABEL_NAME:app.kubernetes.io/name}\ngrafana.kubernetesServiceLabelValue=${GRAFANA_KUBERNETES_SERVICE_LABEL_VALUE:grafana}\ngrafana.kubernetesServicePortName=${GRAFANA_KUBERNETES_SERVICE_PORT_NAME:http-web}\n\nprometheus.kubernetesServiceLabelName=${PROMETHEUS_KUBERNETES_SERVICE_LABEL_NAME:app}\nprometheus.kubernetesServiceLabelValue=${PROMETHEUS_KUBERNETES_SERVICE_LABEL_VALUE:kube-prometheus-stack-prometheus}\nprometheus.kubernetesServicePortName=${PROMETHEUS_KUBERNETES_SERVICE_PORT_NAME:http-web}\n\nloki.kubernetesServiceLabelName=${LOKI_KUBERNETES_SERVICE_LABEL_NAME:app}\nloki.kubernetesServiceLabelValue=${LOKI_KUBERNETES_SERVICE_LABEL_VALUE:loki}\nloki.kubernetesServicePortName=${LOKI_KUBERNETES_SERVICE_PORT_NAME:http-metrics}\n\nhelm.scalarRepositoryName=${HELM_SCALAR_REPOSITORY_NAME:scalar-labs}\nhelm.scalarRepositoryUrl=${HELM_SCALAR_REPOSITORY_URL:https://scalar-labs.github.io/helm-charts}\nhelm.scalarAdminForKubernetesChartName=${HELM_SCALAR_ADMIN_FOR_KUBERNETES_CHART_NAME:scalar-admin-for-kubernetes}\nhelm.scalarAdminForKubernetesChartVersion=${HELM_SCALAR_ADMIN_FOR_KUBERNETES_CHART_VERSION:1.0.0}\n\nconfigMapNamespace=${CONFIG_MAP_NAMESPACE:default}\nconfigMapName=${CONFIG_MAP_NAME:scalar-manager-metadata}\n\npaused-state-retention.storage=${PAUSED_STATE_RETENTION_STORAGE:configmap}\npaused-state-retention.max-number=${PAUSED_STATE_RETENTION_MAX_NUMBER:100}\n"` | | | api.image.pullPolicy | string | `"IfNotPresent"` | | | api.image.repository | string | `"ghcr.io/scalar-labs/scalar-manager-api"` | | | api.image.tag | string | `""` | | -| api.lokiKubernetesServiceLabelName | string | `"app"` | | -| api.lokiKubernetesServiceLabelValue | string | `"loki"` | | -| api.lokiKubernetesServicePortName | string | `"http-metrics"` | | -| api.pausedStateRetentionMaxNumber | string | `"100"` | | -| api.pausedStateRetentionStorage | string | `"configmap"` | | -| api.prometheusKubernetesServiceLabelName | string | `"app"` | | -| api.prometheusKubernetesServiceLabelValue | string | `"kube-prometheus-stack-prometheus"` | | -| api.prometheusKubernetesServicePortName | string | `"http-web"` | | +| api.resources | object | `{}` | | | fullnameOverride | string | `""` | | | imagePullSecrets[0].name | string | `"reg-docker-secrets"` | | | nameOverride | string | `""` | | | nodeSelector | object | `{}` | | | podAnnotations | object | `{}` | | | podLabels | object | `{}` | | -| podSecurityContext | object | `{}` | | +| podSecurityContext.seccompProfile.type | string | `"RuntimeDefault"` | | | replicaCount | int | `1` | | -| resources | object | `{}` | | -| securityContext | object | `{}` | | +| securityContext.allowPrivilegeEscalation | bool | `false` | | +| securityContext.capabilities.drop[0] | string | `"ALL"` | | +| securityContext.runAsNonRoot | bool | `true` | | | service.port | int | `80` | | -| service.type | string | `"LoadBalancer"` | | -| serviceAccount.automount | bool | `true` | | -| serviceAccount.create | bool | `true` | | -| serviceAccount.name | string | `""` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.automountServiceAccountToken | bool | `true` | | +| serviceAccount.serviceAccountName | string | `""` | | | tolerations | list | `[]` | | | web.image.pullPolicy | string | `"IfNotPresent"` | | | web.image.repository | string | `"ghcr.io/scalar-labs/scalar-manager-web"` | | | web.image.tag | string | `""` | | +| web.resources | object | `{}` | | diff --git a/charts/scalar-manager/templates/_helpers.tpl b/charts/scalar-manager/templates/_helpers.tpl index b3d9dd53..a41ac9b0 100644 --- a/charts/scalar-manager/templates/_helpers.tpl +++ b/charts/scalar-manager/templates/_helpers.tpl @@ -48,15 +48,16 @@ Selector labels {{- define "scalar-manager.selectorLabels" -}} app.kubernetes.io/name: {{ include "scalar-manager.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/app: scalar-manager {{- end }} {{/* Create the name of the service account to use */}} {{- define "scalar-manager.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "scalar-manager.fullname" .) .Values.serviceAccount.name }} +{{- if .Values.serviceAccount.serviceAccountName }} +{{- .Values.serviceAccount.serviceAccountName }} {{- else }} -{{- default "default" .Values.serviceAccount.name }} +{{- print (include "scalar-manager.fullname" .) "-sa" | trunc 63 | trimSuffix "-" }} {{- end }} {{- end }} diff --git a/charts/scalar-manager/templates/scalar-manager/configmap.yaml b/charts/scalar-manager/templates/scalar-manager/configmap.yaml index d58dac26..7433d67c 100644 --- a/charts/scalar-manager/templates/scalar-manager/configmap.yaml +++ b/charts/scalar-manager/templates/scalar-manager/configmap.yaml @@ -1,12 +1,8 @@ apiVersion: v1 kind: ConfigMap metadata: - name: {{ include "scalar-manager.fullname" . }} + name: {{ include "scalar-manager.fullname" . }}-api-application-properties namespace: {{ .Release.Namespace }} - labels: - app.kubernetes.io/app: {{ include "scalar-manager.fullname" . }} - {{- include "scalar-manager.labels" . | nindent 4 }} data: - managed-clusters: "[]" - paused-states: "[]" - paused-states-updated-at: "0" + scalar-manager-api-application.properties: + {{- toYaml .Values.api.applicationProperties | nindent 4 }} diff --git a/charts/scalar-manager/templates/scalar-manager/deployment.yaml b/charts/scalar-manager/templates/scalar-manager/deployment.yaml index 6f847fed..fea46c50 100644 --- a/charts/scalar-manager/templates/scalar-manager/deployment.yaml +++ b/charts/scalar-manager/templates/scalar-manager/deployment.yaml @@ -25,62 +25,35 @@ spec: spec: restartPolicy: Always serviceAccountName: {{ include "scalar-manager.serviceAccountName" . }} - automountServiceAccountToken: {{ .Values.serviceAccount.automount }} - terminationGracePeriodSeconds: 90 + automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} containers: - name: {{ .Chart.Name }}-api image: "{{ .Values.api.image.repository }}:{{ .Values.api.image.tag | default .Chart.AppVersion }}" resources: - {{- toYaml .Values.resources | nindent 12 }} + {{- toYaml .Values.api.resources | nindent 12 }} ports: - containerPort: 8080 imagePullPolicy: {{ .Values.api.image.pullPolicy }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} - env: - - name: GRAFANA_KUBERNETES_SERVICE_LABEL_NAME - value: {{ .Values.api.grafanaKubernetesServiceLabelName | quote }} - - name: GRAFANA_KUBERNETES_SERVICE_LABEL_VALUE - value: {{ .Values.api.grafanaKubernetesServiceLabelValue | quote }} - - name: GRAFANA_KUBERNETES_SERVICE_PORT_NAME - value: {{ .Values.api.grafanaKubernetesServicePortName | quote }} - - name: PROMETHEUS_KUBERNETES_SERVICE_LABEL_NAME - value: {{ .Values.api.prometheusKubernetesServiceLabelName | quote }} - - name: PROMETHEUS_KUBERNETES_SERVICE_LABEL_VALUE - value: {{ .Values.api.prometheusKubernetesServiceLabelValue | quote }} - - name: PROMETHEUS_KUBERNETES_SERVICE_PORT_NAME - value: {{ .Values.api.prometheusKubernetesServicePortName | quote }} - - name: LOKI_KUBERNETES_SERVICE_LABEL_NAME - value: {{ .Values.api.lokiKubernetesServiceLabelName | quote }} - - name: LOKI_KUBERNETES_SERVICE_LABEL_VALUE - value: {{ .Values.api.lokiKubernetesServiceLabelValue | quote }} - - name: LOKI_KUBERNETES_SERVICE_PORT_NAME - value: {{ .Values.api.lokiKubernetesServicePortName | quote }} - - name: HELM_SCALAR_REPOSITORY_NAME - value: {{ .Values.api.helmScalarRepositoryName | quote }} - - name: HELM_SCALAR_REPOSITORY_URL - value: {{ .Values.api.helmScalarRepositoryUrl | quote }} - - name: HELM_SCALAR_ADMIN_FOR_KUBERNETES_CHART_NAME - value: {{ .Values.api.helmScalarAdminForKubernetesChartName | quote }} - - name : HELM_SCALAR_ADMIN_FOR_KUBERNETES_CHART_VERSION - value: {{ .Values.api.helmScalarAdminForKubernetesChartVersion | quote }} - - name: CONFIG_MAP_LABEL_NAME - value: "app.kubernetes.io/app" - - name: CONFIG_MAP_LABEL_VALUE - value: {{ include "scalar-manager.fullname" . | quote }} - - name: PAUSED_STATE_RETENTION_STORAGE - value: {{ .Values.api.pausedStateRetentionStorage | quote }} - - name: PAUSED_STATE_RETENTION_MAX_NUMBER - value: {{ .Values.api.pausedStateRetentionMaxNumber | quote }} + volumeMounts: + - name: api-application-properties-volume + mountPath: /app/application.properties + subPath: scalar-manager-api-application.properties - name: {{ .Chart.Name }}-web image: "{{ .Values.web.image.repository }}:{{ .Values.web.image.tag | default .Chart.AppVersion }}" resources: - {{- toYaml .Values.resources | nindent 12 }} + {{- toYaml .Values.web.resources | nindent 12 }} ports: - containerPort: 3000 imagePullPolicy: {{ .Values.web.image.pullPolicy }} securityContext: + runAsUser: 1000 {{- toYaml .Values.securityContext | nindent 12 }} + volumes: + - name: api-application-properties-volume + configMap: + name: {{ include "scalar-manager.fullname" . }}-api-application-properties securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} {{- with .Values.imagePullSecrets }} diff --git a/charts/scalar-manager/templates/scalar-manager/serviceaccount.yaml b/charts/scalar-manager/templates/scalar-manager/serviceaccount.yaml index a3844c71..7ad83bde 100644 --- a/charts/scalar-manager/templates/scalar-manager/serviceaccount.yaml +++ b/charts/scalar-manager/templates/scalar-manager/serviceaccount.yaml @@ -1,4 +1,4 @@ -{{- if not .Values.serviceAccount.name }} +{{- if not .Values.serviceAccount.serviceAccountName }} apiVersion: v1 kind: ServiceAccount metadata: diff --git a/charts/scalar-manager/values.schema.json b/charts/scalar-manager/values.schema.json index 58130444..01114dcb 100644 --- a/charts/scalar-manager/values.schema.json +++ b/charts/scalar-manager/values.schema.json @@ -5,25 +5,7 @@ "api": { "type": "object", "properties": { - "grafanaKubernetesServiceLabelName": { - "type": "string" - }, - "grafanaKubernetesServiceLabelValue": { - "type": "string" - }, - "grafanaKubernetesServicePortName": { - "type": "string" - }, - "helmScalarAdminForKubernetesChartName": { - "type": "string" - }, - "helmScalarAdminForKubernetesChartVersion": { - "type": "string" - }, - "helmScalarRepositoryName": { - "type": "string" - }, - "helmScalarRepositoryUrl": { + "applicationProperties": { "type": "string" }, "image": { @@ -40,29 +22,8 @@ } } }, - "lokiKubernetesServiceLabelName": { - "type": "string" - }, - "lokiKubernetesServiceLabelValue": { - "type": "string" - }, - "lokiKubernetesServicePortName": { - "type": "string" - }, - "pausedStateRetentionMaxNumber": { - "type": "string" - }, - "pausedStateRetentionStorage": { - "type": "string" - }, - "prometheusKubernetesServiceLabelName": { - "type": "string" - }, - "prometheusKubernetesServiceLabelValue": { - "type": "string" - }, - "prometheusKubernetesServicePortName": { - "type": "string" + "resources": { + "type": "object" } } }, @@ -93,16 +54,42 @@ "type": "object" }, "podSecurityContext": { - "type": "object" + "type": "object", + "properties": { + "seccompProfile": { + "type": "object", + "properties": { + "type": { + "type": "string" + } + } + } + } }, "replicaCount": { "type": "integer" }, - "resources": { - "type": "object" - }, "securityContext": { - "type": "object" + "type": "object", + "properties": { + "allowPrivilegeEscalation": { + "type": "boolean" + }, + "capabilities": { + "type": "object", + "properties": { + "drop": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "runAsNonRoot": { + "type": "boolean" + } + } }, "service": { "type": "object", @@ -118,13 +105,10 @@ "serviceAccount": { "type": "object", "properties": { - "automount": { + "automountServiceAccountToken": { "type": "boolean" }, - "create": { - "type": "boolean" - }, - "name": { + "serviceAccountName": { "type": "string" } } @@ -148,6 +132,9 @@ "type": "string" } } + }, + "resources": { + "type": "object" } } } diff --git a/charts/scalar-manager/values.yaml b/charts/scalar-manager/values.yaml index a3c1fc33..9d50bedd 100644 --- a/charts/scalar-manager/values.yaml +++ b/charts/scalar-manager/values.yaml @@ -12,36 +12,27 @@ podAnnotations: {} podLabels: {} podSecurityContext: - {} - # fsGroup: 2000 + seccompProfile: + type: RuntimeDefault securityContext: - {} - # capabilities: - # drop: - # - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - # runAsUser: 1000 + capabilities: + drop: + - ALL + runAsNonRoot: true + allowPrivilegeEscalation: false nodeSelector: {} tolerations: [] service: - type: LoadBalancer + type: ClusterIP port: 80 serviceAccount: - # Specifies whether a service account should be created - create: true - - # Automatically mount a ServiceAccount's API credentials? - automount: true - - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "" + serviceAccountName: "" + automountServiceAccountToken: true api: image: @@ -49,21 +40,43 @@ api: pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. tag: "" - grafanaKubernetesServiceLabelName: "app.kubernetes.io/name" - grafanaKubernetesServiceLabelValue: "grafana" - grafanaKubernetesServicePortName: "http-web" - prometheusKubernetesServiceLabelName: "app" - prometheusKubernetesServiceLabelValue: "kube-prometheus-stack-prometheus" - prometheusKubernetesServicePortName: "http-web" - lokiKubernetesServiceLabelName: "app" - lokiKubernetesServiceLabelValue: "loki" - lokiKubernetesServicePortName: "http-metrics" - helmScalarRepositoryName: "scalar-labs" - helmScalarRepositoryUrl: "https://scalar-labs.github.io/helm-charts" - helmScalarAdminForKubernetesChartName: "scalar-admin-for-kubernetes" - helmScalarAdminForKubernetesChartVersion: "1.0.0" - pausedStateRetentionStorage: "configmap" - pausedStateRetentionMaxNumber: "100" + + resources: + {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + + applicationProperties: | + grafana.kubernetesServiceLabelName=${GRAFANA_KUBERNETES_SERVICE_LABEL_NAME:app.kubernetes.io/name} + grafana.kubernetesServiceLabelValue=${GRAFANA_KUBERNETES_SERVICE_LABEL_VALUE:grafana} + grafana.kubernetesServicePortName=${GRAFANA_KUBERNETES_SERVICE_PORT_NAME:http-web} + + prometheus.kubernetesServiceLabelName=${PROMETHEUS_KUBERNETES_SERVICE_LABEL_NAME:app} + prometheus.kubernetesServiceLabelValue=${PROMETHEUS_KUBERNETES_SERVICE_LABEL_VALUE:kube-prometheus-stack-prometheus} + prometheus.kubernetesServicePortName=${PROMETHEUS_KUBERNETES_SERVICE_PORT_NAME:http-web} + + loki.kubernetesServiceLabelName=${LOKI_KUBERNETES_SERVICE_LABEL_NAME:app} + loki.kubernetesServiceLabelValue=${LOKI_KUBERNETES_SERVICE_LABEL_VALUE:loki} + loki.kubernetesServicePortName=${LOKI_KUBERNETES_SERVICE_PORT_NAME:http-metrics} + + helm.scalarRepositoryName=${HELM_SCALAR_REPOSITORY_NAME:scalar-labs} + helm.scalarRepositoryUrl=${HELM_SCALAR_REPOSITORY_URL:https://scalar-labs.github.io/helm-charts} + helm.scalarAdminForKubernetesChartName=${HELM_SCALAR_ADMIN_FOR_KUBERNETES_CHART_NAME:scalar-admin-for-kubernetes} + helm.scalarAdminForKubernetesChartVersion=${HELM_SCALAR_ADMIN_FOR_KUBERNETES_CHART_VERSION:1.0.0} + + configMapNamespace=${CONFIG_MAP_NAMESPACE:default} + configMapName=${CONFIG_MAP_NAME:scalar-manager-metadata} + + paused-state-retention.storage=${PAUSED_STATE_RETENTION_STORAGE:configmap} + paused-state-retention.max-number=${PAUSED_STATE_RETENTION_MAX_NUMBER:100} web: image: @@ -71,19 +84,18 @@ web: pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. tag: "" + resources: + {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi imagePullSecrets: - name: reg-docker-secrets - -resources: - {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi From 819baf3abac72818d194c2de1a2a9ec10de99392 Mon Sep 17 00:00:00 2001 From: kota2and3kan <47254383+kota2and3kan@users.noreply.github.com> Date: Mon, 20 May 2024 11:33:37 +0900 Subject: [PATCH 07/12] Add label to ConfigMap --- charts/scalar-manager/templates/scalar-manager/configmap.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/charts/scalar-manager/templates/scalar-manager/configmap.yaml b/charts/scalar-manager/templates/scalar-manager/configmap.yaml index 7433d67c..0cc370ed 100644 --- a/charts/scalar-manager/templates/scalar-manager/configmap.yaml +++ b/charts/scalar-manager/templates/scalar-manager/configmap.yaml @@ -3,6 +3,8 @@ kind: ConfigMap metadata: name: {{ include "scalar-manager.fullname" . }}-api-application-properties namespace: {{ .Release.Namespace }} + labels: + {{- include "scalar-manager.labels" . | nindent 4 }} data: scalar-manager-api-application.properties: {{- toYaml .Values.api.applicationProperties | nindent 4 }} From 590d91191db1178bf706ae43ae3f9794e4303563 Mon Sep 17 00:00:00 2001 From: kota2and3kan <47254383+kota2and3kan@users.noreply.github.com> Date: Mon, 20 May 2024 11:39:31 +0900 Subject: [PATCH 08/12] Update default value description of application.properties --- charts/scalar-manager/README.md | 2 +- charts/scalar-manager/values.yaml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/charts/scalar-manager/README.md b/charts/scalar-manager/README.md index 6ad7bcec..5b340ede 100644 --- a/charts/scalar-manager/README.md +++ b/charts/scalar-manager/README.md @@ -11,7 +11,7 @@ Current chart version is `2.0.0-SNAPSHOT` | Key | Type | Default | Description | |-----|------|---------|-------------| -| api.applicationProperties | string | `"grafana.kubernetesServiceLabelName=${GRAFANA_KUBERNETES_SERVICE_LABEL_NAME:app.kubernetes.io/name}\ngrafana.kubernetesServiceLabelValue=${GRAFANA_KUBERNETES_SERVICE_LABEL_VALUE:grafana}\ngrafana.kubernetesServicePortName=${GRAFANA_KUBERNETES_SERVICE_PORT_NAME:http-web}\n\nprometheus.kubernetesServiceLabelName=${PROMETHEUS_KUBERNETES_SERVICE_LABEL_NAME:app}\nprometheus.kubernetesServiceLabelValue=${PROMETHEUS_KUBERNETES_SERVICE_LABEL_VALUE:kube-prometheus-stack-prometheus}\nprometheus.kubernetesServicePortName=${PROMETHEUS_KUBERNETES_SERVICE_PORT_NAME:http-web}\n\nloki.kubernetesServiceLabelName=${LOKI_KUBERNETES_SERVICE_LABEL_NAME:app}\nloki.kubernetesServiceLabelValue=${LOKI_KUBERNETES_SERVICE_LABEL_VALUE:loki}\nloki.kubernetesServicePortName=${LOKI_KUBERNETES_SERVICE_PORT_NAME:http-metrics}\n\nhelm.scalarRepositoryName=${HELM_SCALAR_REPOSITORY_NAME:scalar-labs}\nhelm.scalarRepositoryUrl=${HELM_SCALAR_REPOSITORY_URL:https://scalar-labs.github.io/helm-charts}\nhelm.scalarAdminForKubernetesChartName=${HELM_SCALAR_ADMIN_FOR_KUBERNETES_CHART_NAME:scalar-admin-for-kubernetes}\nhelm.scalarAdminForKubernetesChartVersion=${HELM_SCALAR_ADMIN_FOR_KUBERNETES_CHART_VERSION:1.0.0}\n\nconfigMapNamespace=${CONFIG_MAP_NAMESPACE:default}\nconfigMapName=${CONFIG_MAP_NAME:scalar-manager-metadata}\n\npaused-state-retention.storage=${PAUSED_STATE_RETENTION_STORAGE:configmap}\npaused-state-retention.max-number=${PAUSED_STATE_RETENTION_MAX_NUMBER:100}\n"` | | +| api.applicationProperties | string | The minimum template of application.properties is set by default. | The application.properties for Scalar Manager. If you want to customize application.properties, you can override this value with your application.properties. | | api.image.pullPolicy | string | `"IfNotPresent"` | | | api.image.repository | string | `"ghcr.io/scalar-labs/scalar-manager-api"` | | | api.image.tag | string | `""` | | diff --git a/charts/scalar-manager/values.yaml b/charts/scalar-manager/values.yaml index 9d50bedd..0844ca35 100644 --- a/charts/scalar-manager/values.yaml +++ b/charts/scalar-manager/values.yaml @@ -54,6 +54,8 @@ api: # cpu: 100m # memory: 128Mi + # -- The application.properties for Scalar Manager. If you want to customize application.properties, you can override this value with your application.properties. + # @default -- The minimum template of application.properties is set by default. applicationProperties: | grafana.kubernetesServiceLabelName=${GRAFANA_KUBERNETES_SERVICE_LABEL_NAME:app.kubernetes.io/name} grafana.kubernetesServiceLabelValue=${GRAFANA_KUBERNETES_SERVICE_LABEL_VALUE:grafana} From 5502ca00d60537a0c9e4eb10b6e81c393b47ffb3 Mon Sep 17 00:00:00 2001 From: Plenty Su Date: Mon, 20 May 2024 16:06:02 -0700 Subject: [PATCH 09/12] Remove the runAsUser context --- charts/scalar-manager/templates/scalar-manager/deployment.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/charts/scalar-manager/templates/scalar-manager/deployment.yaml b/charts/scalar-manager/templates/scalar-manager/deployment.yaml index fea46c50..289bbe4f 100644 --- a/charts/scalar-manager/templates/scalar-manager/deployment.yaml +++ b/charts/scalar-manager/templates/scalar-manager/deployment.yaml @@ -48,7 +48,6 @@ spec: - containerPort: 3000 imagePullPolicy: {{ .Values.web.image.pullPolicy }} securityContext: - runAsUser: 1000 {{- toYaml .Values.securityContext | nindent 12 }} volumes: - name: api-application-properties-volume From b497bb191dd83aa393ea3fd363145a9ca1a5cb8b Mon Sep 17 00:00:00 2001 From: kota2and3kan <47254383+kota2and3kan@users.noreply.github.com> Date: Tue, 21 May 2024 11:37:22 +0900 Subject: [PATCH 10/12] Update Chart.yaml --- charts/scalar-manager/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/scalar-manager/Chart.yaml b/charts/scalar-manager/Chart.yaml index 71d6c933..856b4a7d 100644 --- a/charts/scalar-manager/Chart.yaml +++ b/charts/scalar-manager/Chart.yaml @@ -3,7 +3,7 @@ name: scalar-manager description: Scalar Manager type: application version: 2.0.0-SNAPSHOT -appVersion: 2.0.0-SNAPSHOT +appVersion: 1.0.0-SNAPSHOT deprecated: false icon: https://scalar-labs.com/wp-content/themes/scalar/assets/img/logo_scalar.svg keywords: From b870b5a8b363ac40b2d668dbea276eccb52e756a Mon Sep 17 00:00:00 2001 From: kota2and3kan <47254383+kota2and3kan@users.noreply.github.com> Date: Tue, 21 May 2024 11:42:50 +0900 Subject: [PATCH 11/12] Update README to fix CI error --- charts/scalar-manager/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/scalar-manager/README.md b/charts/scalar-manager/README.md index 5b340ede..12fc1ecd 100644 --- a/charts/scalar-manager/README.md +++ b/charts/scalar-manager/README.md @@ -1,6 +1,6 @@ # scalar-manager -![Version: 2.0.0-SNAPSHOT](https://img.shields.io/badge/Version-2.0.0--SNAPSHOT-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.0.0-SNAPSHOT](https://img.shields.io/badge/AppVersion-2.0.0--SNAPSHOT-informational?style=flat-square) +![Version: 2.0.0-SNAPSHOT](https://img.shields.io/badge/Version-2.0.0--SNAPSHOT-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.0.0-SNAPSHOT](https://img.shields.io/badge/AppVersion-1.0.0--SNAPSHOT-informational?style=flat-square) Scalar Manager Current chart version is `2.0.0-SNAPSHOT` From b8864ebd7b5be8f002dfe6289d2182e4ecf04c36 Mon Sep 17 00:00:00 2001 From: Plenty Su Date: Wed, 5 Jun 2024 17:21:18 +0900 Subject: [PATCH 12/12] Make the snapshot version to 3.0.0 --- charts/scalar-manager/Chart.yaml | 4 ++-- charts/scalar-manager/README.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/scalar-manager/Chart.yaml b/charts/scalar-manager/Chart.yaml index 856b4a7d..6e6f65f3 100644 --- a/charts/scalar-manager/Chart.yaml +++ b/charts/scalar-manager/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: scalar-manager description: Scalar Manager type: application -version: 2.0.0-SNAPSHOT -appVersion: 1.0.0-SNAPSHOT +version: 3.0.0-SNAPSHOT +appVersion: 3.0.0-SNAPSHOT deprecated: false icon: https://scalar-labs.com/wp-content/themes/scalar/assets/img/logo_scalar.svg keywords: diff --git a/charts/scalar-manager/README.md b/charts/scalar-manager/README.md index 12fc1ecd..15eb3395 100644 --- a/charts/scalar-manager/README.md +++ b/charts/scalar-manager/README.md @@ -1,9 +1,9 @@ # scalar-manager -![Version: 2.0.0-SNAPSHOT](https://img.shields.io/badge/Version-2.0.0--SNAPSHOT-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.0.0-SNAPSHOT](https://img.shields.io/badge/AppVersion-1.0.0--SNAPSHOT-informational?style=flat-square) +![Version: 3.0.0-SNAPSHOT](https://img.shields.io/badge/Version-3.0.0--SNAPSHOT-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.0.0-SNAPSHOT](https://img.shields.io/badge/AppVersion-3.0.0--SNAPSHOT-informational?style=flat-square) Scalar Manager -Current chart version is `2.0.0-SNAPSHOT` +Current chart version is `3.0.0-SNAPSHOT` **Homepage:**