make charts

Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
pull/3104/head
Francesco Giudici 2023-10-09 12:00:46 +02:00
parent bd4dd087bc
commit 2c4fa4dc0c
20 changed files with 3283 additions and 0 deletions

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,11 @@
annotations:
catalog.cattle.io/certified: rancher
catalog.cattle.io/hidden: "true"
catalog.cattle.io/namespace: cattle-elemental-system
catalog.cattle.io/release-name: elemental-operator-crds
apiVersion: v2
appVersion: 1.3.4
description: A Helm chart for deploying Rancher Elemental Operator CRDs
name: elemental-crd
type: application
version: 103.0.0+up1.3.4

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,20 @@
annotations:
catalog.cattle.io/auto-install: elemental-crd=match
catalog.cattle.io/certified: rancher
catalog.cattle.io/display-name: Elemental
catalog.cattle.io/kube-version: '>= 1.23.0-0'
catalog.cattle.io/namespace: cattle-elemental-system
catalog.cattle.io/os: linux
catalog.cattle.io/permits-os: linux
catalog.cattle.io/provides-gvr: elemental.cattle.io/v1beta1
catalog.cattle.io/rancher-version: '>= 2.8.0-0 < 2.9.0-0'
catalog.cattle.io/release-name: elemental-operator
catalog.cattle.io/scope: management
catalog.cattle.io/type: cluster-tool
catalog.cattle.io/upstream-version: 1.3.4
apiVersion: v2
appVersion: 1.3.4
description: Elemental provides Cloud Native OS Management for Cluster Nodes.
icon: https://raw.githubusercontent.com/rancher/elemental/main/logo/icon-elemental.svg
name: elemental
version: 103.0.0+up1.3.4

View File

@ -0,0 +1,5 @@
# Elemental Operator Helm Chart
This chart bootstraps an elemental-operator deployment on a [Rancher Manager](https://rancher.com/docs/rancher/) cluster using the [Helm](https://helm.sh) package manager.
Check out the [Elemental Operator Helm Chart documentation](https://elemental.docs.rancher.com/elementaloperatorchart-reference/) in the official [Elemental guide](https://elemental.docs.rancher.com/).

View File

@ -0,0 +1,5 @@
# Elemental
Elemental brings to Rancher the ability to install and manage the OS of bare metal and virtualized machines.
For more information on how to deploy an Elemental Cluster, follow the [official documentation](https://elemental.docs.rancher.com/).

View File

@ -0,0 +1,27 @@
questions:
- variable: channel.defaultChannel
default: "true"
description: "Provide an Elemental OS Channel container image"
label: Elemental OS Channel
type: boolean
show_subquestion_if: true
group: "Elemental OS Channel"
subquestions:
- variable: channel.repository
default: registry.suse.com/rancher/elemental-teal-channel
description: "Specify Elemental OS channel repository"
type: string
label: Elemental OS Channel Repository
group: "Elemental OS Channel"
- variable: channel.tag
default: "1.3.4"
description: "Specify Elemental OS channel tag"
type: string
label: "Elemental OS Channel Tag"
group: "Elemental OS Channel"
- variable: debug
default: "false"
description: "Enable debug logging in the Elemental operator"
type: boolean
label: "Enable Debug Logging"
group: "Logging"

View File

@ -0,0 +1,17 @@
{{- define "system_default_registry" -}}
{{- if .Values.global.cattle.systemDefaultRegistry -}}
{{- printf "%s/" .Values.global.cattle.systemDefaultRegistry -}}
{{- else -}}
{{- "" -}}
{{- end -}}
{{- end -}}
{{- define "registry_url" -}}
{{- if .Values.global.cattle.systemDefaultRegistry -}}
{{ include "system_default_registry" . }}
{{- else if .Values.registryUrl -}}
{{- printf "%s/" .Values.registryUrl -}}
{{- else -}}
{{- "" -}}
{{- end -}}
{{- end -}}

View File

@ -0,0 +1,9 @@
kind: APIService
apiVersion: management.cattle.io/v3
metadata:
name: {{ .Release.Name }}
spec:
secretName: elemental-operator
secretNamespace: {{ .Release.Namespace }}
pathPrefixes:
- /elemental/

View File

@ -0,0 +1,10 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: elemental-capi-role
labels:
cluster.x-k8s.io/aggregate-to-manager: "true"
rules:
- apiGroups: ["elemental.cattle.io"]
resources: ["*"]
verbs: ["*"]

View File

@ -0,0 +1,11 @@
{{ if and .Values.channel .Values.channel.repository .Values.channel.tag }}
apiVersion: elemental.cattle.io/v1beta1
kind: ManagedOSVersionChannel
metadata:
name: elemental-os-channel
namespace: fleet-default
spec:
options:
image: {{ .Values.channel.repository }}:{{ .Values.channel.tag }}
type: custom
{{ end }}

View File

@ -0,0 +1,267 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: '{{ .Release.Name }}'
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
- apiGroups:
- ""
resources:
- pods
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- pods/log
verbs:
- get
- apiGroups:
- ""
resources:
- pods/status
verbs:
- get
- apiGroups:
- ""
resources:
- secrets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- serviceaccounts
verbs:
- create
- delete
- get
- list
- watch
- apiGroups:
- ""
resources:
- services
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- services/status
verbs:
- get
- apiGroups:
- cluster.x-k8s.io
resources:
- machines
verbs:
- get
- list
- watch
- apiGroups:
- elemental.cattle.io
resources:
- machineinventories
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- elemental.cattle.io
resources:
- machineinventories/status
verbs:
- get
- patch
- update
- apiGroups:
- elemental.cattle.io
resources:
- machineinventoryselectors
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- elemental.cattle.io
resources:
- machineinventoryselectors/status
verbs:
- get
- list
- patch
- update
- apiGroups:
- elemental.cattle.io
resources:
- machineregistrations
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- elemental.cattle.io
resources:
- machineregistrations/status
verbs:
- get
- patch
- update
- apiGroups:
- elemental.cattle.io
resources:
- managedosimages
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- elemental.cattle.io
resources:
- managedosimages/status
verbs:
- get
- list
- patch
- update
- apiGroups:
- elemental.cattle.io
resources:
- managedosversionchannels
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- elemental.cattle.io
resources:
- managedosversionchannels/status
verbs:
- get
- list
- patch
- update
- apiGroups:
- elemental.cattle.io
resources:
- managedosversions
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- elemental.cattle.io
resources:
- managedosversions/status
verbs:
- get
- patch
- update
- apiGroups:
- elemental.cattle.io
resources:
- seedimages
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- elemental.cattle.io
resources:
- seedimages/status
verbs:
- get
- patch
- update
- apiGroups:
- fleet.cattle.io
resources:
- bundles
verbs:
- create
- get
- list
- watch
- apiGroups:
- management.cattle.io
resources:
- settings
verbs:
- get
- list
- watch
- apiGroups:
- rbac.authorization.k8s.io
resources:
- rolebindings
- roles
verbs:
- create
- delete
- list
- watch

View File

@ -0,0 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ .Release.Name }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ .Release.Name }}
subjects:
- kind: ServiceAccount
name: {{ .Release.Name }}
namespace: {{.Release.Namespace}}

View File

@ -0,0 +1,50 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}
spec:
replicas: {{ .Values.replicas }}
selector:
matchLabels:
app: elemental-operator
template:
metadata:
labels:
app: elemental-operator
spec:
containers:
- env:
- name: NO_PROXY
value: {{ .Values.noProxy }}
{{- if .Values.proxy }}
- name: HTTP_PROXY
value: {{ .Values.proxy }}
- name: HTTPS_PROXY
value: {{ .Values.proxy }}
{{- end }}
name: {{ .Release.Name }}
imagePullPolicy: "{{ .Values.image.imagePullPolicy }}"
image: {{ template "registry_url" . }}{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}
args:
- operator
{{- if .Values.debug }}
- --v=5
- --debug
{{- end }}
- --namespace
- {{ .Release.Namespace }}
- --operator-image
- {{ template "registry_url" . }}{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}
- --seedimage-image
- {{ template "registry_url" . }}{{ .Values.seedImage.repository }}:{{ .Values.seedImage.tag | default .Chart.AppVersion }}
- --seedimage-image-pullpolicy
- {{ .Values.seedImage.imagePullPolicy}}
serviceAccountName: {{ .Release.Name }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}

View File

@ -0,0 +1,16 @@
apiVersion: management.cattle.io/v3
builtin: false
description: "Elemental Administrator Role"
displayName: Elemental Administrator
kind: GlobalRole
metadata:
labels:
cattle.io/creator: norman
name: {{ .Release.Name }}
rules:
- apiGroups:
- elemental.cattle.io
resources:
- '*'
verbs:
- '*'

View File

@ -0,0 +1,4 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Release.Name }}

View File

@ -0,0 +1,25 @@
{{ if gt (len (lookup "rbac.authorization.k8s.io/v1" "ClusterRole" "" "")) 0 }}
{{ $apis := dict
"elemental.cattle.io/v1beta1/MachineInventory" "machineinventories"
"elemental.cattle.io/v1beta1/MachineInventorySelector" "machineinventoryselectors"
"elemental.cattle.io/v1beta1/MachineInventorySelectorTemplate" "machineinventoryselectortemplates"
"elemental.cattle.io/v1beta1/MachineRegistration" "machineregistrations"
"elemental.cattle.io/v1beta1/ManagedOSImage" "managedosimages"
"elemental.cattle.io/v1beta1/ManagedOSVersionChannel" "managedosversionchannels"
"elemental.cattle.io/v1beta1/ManagedOSVersion" "managedosversions"
"elemental.cattle.io/v1beta1/SeedImage" "seedimages"
}}
{{- range $api, $crd := $apis -}}
{{- if not ($.Capabilities.APIVersions.Has $api) -}}
{{- required "Required CRDs are missing. Please install the corresponding CRD chart before installing this chart." "" -}}
{{- end -}}
{{- $crdobj := lookup "apiextensions.k8s.io/v1" "CustomResourceDefinition" "" (print $crd ".elemental.cattle.io") -}}
{{- if not $crdobj -}}
{{- print "Cannot lookup " $crd ".elemental.cattle.io crd object" | fail -}}
{{- end -}}
{{- $crdrelease := index $crdobj.metadata.annotations "meta.helm.sh/release-name" -}}
{{- if eq $crdrelease $.Release.Name -}}
{{- required "Elemental CRDs should be moved to the new elemental-operator-crds chart before upgrading this operator." "" -}}
{{- end -}}
{{- end -}}
{{- end -}}

View File

@ -0,0 +1,42 @@
image:
empty: rancher/pause:3.1
repository: "rancher/mirrored-elemental-operator"
tag: "1.3.4"
imagePullPolicy: IfNotPresent
seedImage:
repository: "rancher/mirrored-elemental-seedimage-builder"
tag: "1.3.4"
imagePullPolicy: IfNotPresent
channel:
repository: ""
tag: ""
# number of operator replicas to deploy
replicas: 1
# http[s] proxy server
# proxy: http://<username>@<password>:<url>:<port>
# comma separated list of domains or ip addresses that will not use the proxy
noProxy: 127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,.svc,.cluster.local
global:
cattle:
systemDefaultRegistry: ""
# used only if systemDefaultRegistry is empty
registryUrl: ""
# enable debug output for operator
debug: false
nodeSelector:
kubernetes.io/os: linux
tolerations:
- key: cattle.io/os
operator: "Equal"
value: "linux"
effect: NoSchedule

View File

@ -1,5 +1,46 @@
apiVersion: v1
entries:
elemental:
- annotations:
catalog.cattle.io/auto-install: elemental-crd=match
catalog.cattle.io/certified: rancher
catalog.cattle.io/display-name: Elemental
catalog.cattle.io/kube-version: '>= 1.23.0-0'
catalog.cattle.io/namespace: cattle-elemental-system
catalog.cattle.io/os: linux
catalog.cattle.io/permits-os: linux
catalog.cattle.io/provides-gvr: elemental.cattle.io/v1beta1
catalog.cattle.io/rancher-version: '>= 2.8.0-0 < 2.9.0-0'
catalog.cattle.io/release-name: elemental-operator
catalog.cattle.io/scope: management
catalog.cattle.io/type: cluster-tool
catalog.cattle.io/upstream-version: 1.3.4
apiVersion: v2
appVersion: 1.3.4
created: "2023-10-09T11:59:28.169826066+02:00"
description: Elemental provides Cloud Native OS Management for Cluster Nodes.
digest: 96de208abc03a5506206325ed4f80de06abd1dd8520a98ac48d5673bd780c673
icon: https://raw.githubusercontent.com/rancher/elemental/main/logo/icon-elemental.svg
name: elemental
urls:
- assets/elemental/elemental-103.0.0+up1.3.4.tgz
version: 103.0.0+up1.3.4
elemental-crd:
- annotations:
catalog.cattle.io/certified: rancher
catalog.cattle.io/hidden: "true"
catalog.cattle.io/namespace: cattle-elemental-system
catalog.cattle.io/release-name: elemental-operator-crds
apiVersion: v2
appVersion: 1.3.4
created: "2023-10-09T11:59:29.728109125+02:00"
description: A Helm chart for deploying Rancher Elemental Operator CRDs
digest: 832419128610fa1055f23b5b4791c9e6ed5c6178f249435ea0671359a6327e5e
name: elemental-crd
type: application
urls:
- assets/elemental-crd/elemental-crd-103.0.0+up1.3.4.tgz
version: 103.0.0+up1.3.4
epinio:
- annotations:
artifacthub.io/license: Apache-2.0