Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Robot Upgrade: kubean chart upgrade from v0.4.3 to v0.22.1 #2787

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/kubean/config
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export USE_OPENSOURCE_CHART=false
export REPO_URL=https://kubean-io.github.io/kubean-helm-chart
export REPO_NAME=kubean-io
export CHART_NAME=kubean
export VERSION=v0.4.3
export VERSION=v0.22.1

# pr issue
export UPGRADE_METHOD=pr
Expand Down
6 changes: 3 additions & 3 deletions charts/kubean/kubean/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
apiVersion: v2
appVersion: v0.4.3
appVersion: v0.22.1
description: A Helm chart for kubean
icon: https://avatars.githubusercontent.com/u/108458246
name: kubean
type: application
version: v0.4.3
version: v0.22.1
dependencies:
- name: kubean
version: "v0.4.3"
version: "v0.22.1"
repository: "https://kubean-io.github.io/kubean-helm-chart"
annotations:
addon.kpanda.io/namespace: kubean-system
Expand Down
47 changes: 45 additions & 2 deletions charts/kubean/kubean/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,55 @@ The Kubean provides the following features.

* Support for both AMD64 and ARM64.

## Install
## Parameters

### kubean-operator parameters

| Name | Description | Value |
| ------------------------------------------- | ----------------------------------------------------- | --------------------------- |
| `kubeanOperator.replicaCount` | Number of kubean-operator replicas to deploy | `1` |
| `kubeanOperator.nameOverride` | String to partially override kubean-operator.fullname | `""` |
| `kubeanOperator.fullnameOverride` | String to fully override kubean-operator.fullname | `""` |
| `kubeanOperator.operationsBackendLimit` | Limit of operations backend | `5` |
| `kubeanOperator.podAnnotations` | Annotations to add to the kubean-operator pods | `{}` |
| `kubeanOperator.podSecurityContext` | Security context for kubean-operator pods | `{}` |
| `kubeanOperator.securityContext` | Security context for kubean-operator containers | `{}` |
| `kubeanOperator.serviceAccount.create` | Specifies whether a service account should be created | `true` |
| `kubeanOperator.serviceAccount.annotations` | Annotations to add to the service account | `{}` |
| `kubeanOperator.serviceAccount.name` | The name of the service account to use. | `""` |
| `kubeanOperator.image.registry` | kubean-operator image registry | `ghcr.io` |
| `kubeanOperator.image.repository` | kubean-operator image repository | `kubean-io/kubean-operator` |
| `kubeanOperator.image.tag` | kubean-operator image tag | `""` |
| `kubeanOperator.image.pullPolicy` | kubean-operator image pull policy | `IfNotPresent` |
| `kubeanOperator.image.pullSecrets` | kubean-operator image pull secrets | `[]` |
| `kubeanOperator.service.type` | kubean-operator service type | `ClusterIP` |
| `kubeanOperator.service.port` | kubean-operator service port | `80` |
| `kubeanOperator.resources` | kubean-operator resources | `{}` |
| `kubeanOperator.nodeSelector` | kubean-operator node selector | `{}` |
| `kubeanOperator.tolerations` | kubean-operator tolerations | `[]` |

### kubean admission parameters

| Name | Description | Value |
| ---------------------------------- | --------------------------------------------- | ---------------------------- |
| `kubeanAdmission.replicaCount` | Number of kubean-admission replicas to deploy | `1` |
| `kubeanAdmission.image.registry` | kubean-admission image registry | `ghcr.io` |
| `kubeanAdmission.image.repository` | kubean-admission image repository | `kubean-io/kubean-admission` |
| `kubeanAdmission.image.tag` | kubean-admission image tag | `""` |

### sprayJob parameters

| Name | Description | Value |
| --------------------------- | -------------------------- | --------------------- |
| `sprayJob.image.registry` | spray-job image registry | `ghcr.io` |
| `sprayJob.image.repository` | spray-job image repository | `kubean-io/spray-job` |
| `sprayJob.image.tag` | spray-job image tag | `""` |


First, add the Kubean chart repo to your local repository.
``` bash
$ helm repo add kubean-io https://kubean-io.github.io/kubean-helm-chart/

$ helm repo update
$ helm repo list
NAME URL
kubean-io https://kubean-io.github.io/kubean-helm-chart/
Expand Down
2 changes: 2 additions & 0 deletions charts/kubean/kubean/charts/kubean/.relok8s-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
- "{{ .kubeanOperator.image.registry }}/{{ .kubeanOperator.image.repository }}:{{ .kubeanOperator.image.tag }}"
# spray-job
- "{{ .sprayJob.image.registry }}/{{ .sprayJob.image.repository }}:{{ .sprayJob.image.tag }}"
# kubean-admission
- "{{ .kubeanAdmission.image.registry }}/{{ .kubeanAdmission.image.repository }}:{{ .kubeanAdmission.image.tag }}"
4 changes: 2 additions & 2 deletions charts/kubean/kubean/charts/kubean/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
appVersion: v0.4.3
appVersion: v0.22.1
description: A Helm chart for kubean
icon: https://avatars.githubusercontent.com/u/108458246
name: kubean
type: application
version: v0.4.3
version: v0.22.1
47 changes: 45 additions & 2 deletions charts/kubean/kubean/charts/kubean/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,55 @@ The Kubean provides the following features.

* Support for both AMD64 and ARM64.

## Install
## Parameters

### kubean-operator parameters

| Name | Description | Value |
| ------------------------------------------- | ----------------------------------------------------- | --------------------------- |
| `kubeanOperator.replicaCount` | Number of kubean-operator replicas to deploy | `1` |
| `kubeanOperator.nameOverride` | String to partially override kubean-operator.fullname | `""` |
| `kubeanOperator.fullnameOverride` | String to fully override kubean-operator.fullname | `""` |
| `kubeanOperator.operationsBackendLimit` | Limit of operations backend | `5` |
| `kubeanOperator.podAnnotations` | Annotations to add to the kubean-operator pods | `{}` |
| `kubeanOperator.podSecurityContext` | Security context for kubean-operator pods | `{}` |
| `kubeanOperator.securityContext` | Security context for kubean-operator containers | `{}` |
| `kubeanOperator.serviceAccount.create` | Specifies whether a service account should be created | `true` |
| `kubeanOperator.serviceAccount.annotations` | Annotations to add to the service account | `{}` |
| `kubeanOperator.serviceAccount.name` | The name of the service account to use. | `""` |
| `kubeanOperator.image.registry` | kubean-operator image registry | `ghcr.io` |
| `kubeanOperator.image.repository` | kubean-operator image repository | `kubean-io/kubean-operator` |
| `kubeanOperator.image.tag` | kubean-operator image tag | `""` |
| `kubeanOperator.image.pullPolicy` | kubean-operator image pull policy | `IfNotPresent` |
| `kubeanOperator.image.pullSecrets` | kubean-operator image pull secrets | `[]` |
| `kubeanOperator.service.type` | kubean-operator service type | `ClusterIP` |
| `kubeanOperator.service.port` | kubean-operator service port | `80` |
| `kubeanOperator.resources` | kubean-operator resources | `{}` |
| `kubeanOperator.nodeSelector` | kubean-operator node selector | `{}` |
| `kubeanOperator.tolerations` | kubean-operator tolerations | `[]` |

### kubean admission parameters

| Name | Description | Value |
| ---------------------------------- | --------------------------------------------- | ---------------------------- |
| `kubeanAdmission.replicaCount` | Number of kubean-admission replicas to deploy | `1` |
| `kubeanAdmission.image.registry` | kubean-admission image registry | `ghcr.io` |
| `kubeanAdmission.image.repository` | kubean-admission image repository | `kubean-io/kubean-admission` |
| `kubeanAdmission.image.tag` | kubean-admission image tag | `""` |

### sprayJob parameters

| Name | Description | Value |
| --------------------------- | -------------------------- | --------------------- |
| `sprayJob.image.registry` | spray-job image registry | `ghcr.io` |
| `sprayJob.image.repository` | spray-job image repository | `kubean-io/spray-job` |
| `sprayJob.image.tag` | spray-job image tag | `""` |


First, add the Kubean chart repo to your local repository.
``` bash
$ helm repo add kubean-io https://kubean-io.github.io/kubean-helm-chart/

$ helm repo update
$ helm repo list
NAME URL
kubean-io https://kubean-io.github.io/kubean-helm-chart/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand Down Expand Up @@ -43,13 +42,24 @@ spec:
properties:
action:
type: string
actionSource:
default: builtin
type: string
actionSourceRef:
properties:
name:
type: string
namespace:
type: string
required:
- name
- namespace
type: object
actionType:
type: string
activeDeadlineSeconds:
format: int64
type: integer
backoffLimit:
type: integer
cluster:
description: Cluster the name of Cluster.kubean.io.
type: string
Expand Down Expand Up @@ -86,6 +96,19 @@ spec:
properties:
action:
type: string
actionSource:
default: builtin
type: string
actionSourceRef:
properties:
name:
type: string
namespace:
type: string
required:
- name
- namespace
type: object
actionType:
type: string
extraArgs:
Expand All @@ -100,6 +123,19 @@ spec:
properties:
action:
type: string
actionSource:
default: builtin
type: string
actionSourceRef:
properties:
name:
type: string
namespace:
type: string
required:
- name
- namespace
type: object
actionType:
type: string
extraArgs:
Expand All @@ -112,6 +148,27 @@ spec:
resources:
description: ResourceRequirements describes the compute resource requirements.
properties:
claims:
description: "Claims lists the names of resources, defined in
spec.resourceClaims, that are used by this container. \n This
is an alpha field and requires enabling the DynamicResourceAllocation
feature gate. \n This field is immutable. It can only be set
for containers."
items:
description: ResourceClaim references one entry in PodSpec.ResourceClaims.
properties:
name:
description: Name must match the name of one entry in pod.spec.resourceClaims
of the Pod where this field is used. It makes that resource
available inside a container.
type: string
required:
- name
type: object
type: array
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
limits:
additionalProperties:
anyOf:
Expand Down Expand Up @@ -162,7 +219,6 @@ spec:
required:
- action
- actionType
- backoffLimit
- cluster
- image
type: object
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand Down Expand Up @@ -62,6 +61,16 @@ spec:
- name
- namespace
type: object
preCheckRef:
properties:
name:
type: string
namespace:
type: string
required:
- name
- namespace
type: object
sshAuthRef:
description: SSHAuthRef stores ssh key and if it is empty ,then use
sshpass.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand Down Expand Up @@ -101,6 +100,9 @@ spec:
type: string
type: object
type: array
imageRepoScheme:
default: https
type: string
yumRepos:
additionalProperties:
items:
Expand Down
21 changes: 19 additions & 2 deletions charts/kubean/kubean/charts/kubean/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ If release name contains chart name it will be used as a full name.
{{- end }}
{{- end }}

{{- define "kubean.admissionName" -}}
{{- printf "%s-admission" .Release.Name }}
{{- end }}

{{/*
Create chart name and version as used by the chart label.
*/}}
Expand All @@ -38,18 +42,27 @@ Create chart name and version as used by the chart label.
Common labels
*/}}
{{- define "kubean.labels" -}}
{{ include "kubean.selectorLabels" . }}
{{ include "kubeanOperator.selectorLabels" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "kubean.selectorLabels" -}}
{{- define "kubeanOperator.selectorLabels" -}}
app.kubernetes.io/name: {{ include "kubean.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{- define "kubeanAdmission.selectorLabels" -}}
app.kubernetes.io/name: {{ include "kubean.name" . }}
app.kubernetes.io/instance: {{ printf "%s-admission-controller" .Release.Name }}
{{- end }}

{{- define "kubeanAdmission.svcName" -}}
{{- printf "%s-admission" .Chart.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
Expand All @@ -60,3 +73,7 @@ Create the name of the service account to use
{{- default "default" .Values.kubeanOperator.serviceAccount.name }}
{{- end }}
{{- end }}

{{- define "kubean.prehookImage" -}}
{{- printf "%s/%s:%v" .Values.sprayJob.image.registry .Values.sprayJob.image.repository (.Values.sprayJob.image.tag | default .Chart.Version) }}
{{- end }}
25 changes: 7 additions & 18 deletions charts/kubean/kubean/charts/kubean/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,10 @@ kind: ClusterRole
metadata:
name: {{ $name }}
rules:
- apiGroups: ['*']
resources: ['*']
verbs: ['*']
- nonResourceURLs: ['*']
verbs: ['*']
- apiGroups: ['certificates.k8s.io']
resourceNames: ['kubernetes.io/*']
resources: ['signers']
verbs: ['approve']
- apiGroups: ['rbac.authorization.k8s.io']
resources: ['clusterroles']
verbs: ['*']
- apiGroups: ['authentication.k8s.io']
resources: ['*']
verbs: ['*']
- apiGroups: ['authorization.k8s.io']
resources: ['*']
verbs: ['*']
- apiGroups: [ 'kubean.io' ]
resources: [ 'clusteroperations','clusteroperations/status','clusters','clusters/status','localartifactsets','localartifactsets/status','manifests','manifests/status' ]
verbs: [ '*' ]
- apiGroups: [ 'admissionregistration.k8s.io' ]
resources: [ 'validatingwebhookconfigurations' ]
resourceNames: [ 'kubean-admission-webhook' ]
verbs: [ 'get', 'create', 'update' ]
5 changes: 3 additions & 2 deletions charts/kubean/kubean/charts/kubean/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "kubean.fullname" . }}-config
name: kubean-config
namespace: {{ include "kubean.namespace" . }}
labels:
{{- include "kubean.labels" . | nindent 4}}
data:
BACKEND_LIMIT: "10"
CLUSTER_OPERATIONS_BACKEND_LIMIT: "{{ .Values.kubeanOperator.operationsBackendLimit }}"
SPRAY_JOB_IMAGE_REGISTRY: "{{ .Values.sprayJob.image.registry }}"
Loading