From 421a62194280a8a81f155c7cba788db517746691 Mon Sep 17 00:00:00 2001 From: Shiming Zhang Date: Thu, 27 Jun 2024 20:48:26 +0800 Subject: [PATCH] Test --- .github/workflows/releases-charts.yaml | 1 - charts/kwok/Chart.yaml | 13 +++-- charts/kwok/README.md | 35 +++++++++++++ charts/stage-fast/Chart.yaml | 14 ++++-- charts/stage-fast/README.md | 35 +++++++++++++ charts/stage-fast/templates/_helpers.tpl | 62 ------------------------ 6 files changed, 91 insertions(+), 69 deletions(-) create mode 100644 charts/kwok/README.md create mode 100644 charts/stage-fast/README.md delete mode 100644 charts/stage-fast/templates/_helpers.tpl diff --git a/.github/workflows/releases-charts.yaml b/.github/workflows/releases-charts.yaml index b7ae29247e..66c56faa55 100644 --- a/.github/workflows/releases-charts.yaml +++ b/.github/workflows/releases-charts.yaml @@ -41,6 +41,5 @@ jobs: if: ${{ env.PUSH == 'true' }} env: CR_RELEASE_NAME_TEMPLATE: "{{ .Name }}-helm-chart-{{ .Version }}" - CR_RELEASE_NOTES_FILE: RELEASE.md CR_MAKE_RELEASE_LATEST: false CR_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/charts/kwok/Chart.yaml b/charts/kwok/Chart.yaml index 21284d1a90..18a4ad92a4 100644 --- a/charts/kwok/Chart.yaml +++ b/charts/kwok/Chart.yaml @@ -1,6 +1,13 @@ apiVersion: v2 +appVersion: "0.5.2" +description: KWOK (Kubernetes WithOut Kubelet) type: application +home: https://kwok.sigs.k8s.io/ +icon: https://github.com/kubernetes-sigs/kwok/raw/main/logo/kwok.png +keywords: +- kubernetes +- kwok +sources: +- https://github.com/kubernetes-sigs/kwok name: kwok -description: KWOK (Kubernetes WithOut Kubelet) -version: 0.0.1 -appVersion: "0.5.2" +version: 0.0.2 diff --git a/charts/kwok/README.md b/charts/kwok/README.md new file mode 100644 index 0000000000..94df16c2e3 --- /dev/null +++ b/charts/kwok/README.md @@ -0,0 +1,35 @@ +# KWOK (Kubernetes WithOut Kubelet) + +[KWOK](https://github.com/kubernetes-sigs/kwok/) - Simulates thousands of Nodes and Clusters. + +## Installing the Chart + +Before you can install the chart you will need to add the `kwok` repo to [Helm](https://helm.sh/). + +```shell +helm repo add kwok https://kubernetes-sigs.github.io/kwok/ +``` + +After you've installed the repo you can install the chart. + +```shell +helm upgrade --install kwok kwok/kwok +``` + +Set up default custom resources (CRs) of stages +```shell +helm upgrade --install kwok kwok/stage-fast +``` + +## Configuration + +The following table lists the configurable parameters of the KWOK chart and their default values. + +| Parameter | Description | Default | +| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | +| `image.repository` | Image repository. | `registry.k8s.io/metrics-server/metrics-server` | +| `image.tag` | Image tag, will override the default tag derived from the chart app version. | `""` | +| `image.pullPolicy` | Image pull policy. | `IfNotPresent` | +| `imagePullSecrets` | Image pull secrets. | `[]` | +| `nameOverride` | Override the `name` of the chart. | `nil` | +| `fullnameOverride` | Override the `fullname` of the chart. | `nil` | diff --git a/charts/stage-fast/Chart.yaml b/charts/stage-fast/Chart.yaml index 43d3df9024..28be11b079 100644 --- a/charts/stage-fast/Chart.yaml +++ b/charts/stage-fast/Chart.yaml @@ -1,6 +1,14 @@ apiVersion: v2 +annotations: + kwok.x-k8s.io/version: "0.5.2" +description: Default stage policy of KWOK (Kubernetes WithOut Kubelet) type: application +home: https://kwok.sigs.k8s.io/ +icon: https://github.com/kubernetes-sigs/kwok/raw/main/logo/kwok.png +keywords: +- kubernetes +- kwok +sources: +- https://github.com/kubernetes-sigs/kwok name: stage-fast -description: Default stage policy of KWOK (Kubernetes WithOut Kubelet) -version: 0.0.1 -appVersion: "0.5.2" +version: 0.0.2 diff --git a/charts/stage-fast/README.md b/charts/stage-fast/README.md new file mode 100644 index 0000000000..8b6a04cf06 --- /dev/null +++ b/charts/stage-fast/README.md @@ -0,0 +1,35 @@ +# Default stage policy of KWOK (Kubernetes WithOut Kubelet) + +[KWOK](https://github.com/kubernetes-sigs/kwok/) - Simulates thousands of Nodes and Clusters. + +## Installing the Chart + +Before you can install the chart you will need to add the `kwok` repo to [Helm](https://helm.sh/). + +```shell +helm repo add kwok https://kubernetes-sigs.github.io/kwok/ +``` + +After you've installed the repo you can install the chart. + +```shell +helm upgrade --install kwok kwok/kwok +``` + +Set up default custom resources (CRs) of stages +```shell +helm upgrade --install kwok kwok/stage-fast +``` + +## Configuration + +The following table lists the configurable parameters of the KWOK chart and their default values. + +| Parameter | Description | Default | +| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | +| `image.repository` | Image repository. | `registry.k8s.io/metrics-server/metrics-server` | +| `image.tag` | Image tag, will override the default tag derived from the chart app version. | `""` | +| `image.pullPolicy` | Image pull policy. | `IfNotPresent` | +| `imagePullSecrets` | Image pull secrets. | `[]` | +| `nameOverride` | Override the `name` of the chart. | `nil` | +| `fullnameOverride` | Override the `fullname` of the chart. | `nil` | diff --git a/charts/stage-fast/templates/_helpers.tpl b/charts/stage-fast/templates/_helpers.tpl deleted file mode 100644 index 7720910c3d..0000000000 --- a/charts/stage-fast/templates/_helpers.tpl +++ /dev/null @@ -1,62 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "stage-fast.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 "stage-fast.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 "stage-fast.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "stage-fast.labels" -}} -helm.sh/chart: {{ include "stage-fast.chart" . }} -{{ include "stage-fast.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "stage-fast.selectorLabels" -}} -app.kubernetes.io/name: {{ include "stage-fast.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "stage-fast.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "stage-fast.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }}