feat: bump harvester-cloud-provider to v0.2.8

Signed-off-by: PoAn Yang <poan.yang@suse.com>
main
actions 2025-01-09 03:11:03 +00:00
parent 7142aa5d06
commit cd45c7885c
23 changed files with 1098 additions and 0 deletions

View File

@ -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/

View File

@ -0,0 +1,6 @@
dependencies:
- name: kube-vip
repository: file://dependency_charts/kube-vip
version: 0.6.4
digest: sha256:857edf047d3e5011242eb3c05a940f966ce0d3d1100f00f6bf095177119842a0
generated: "2024-12-19T17:51:27.827525+08:00"

View File

@ -0,0 +1,26 @@
annotations:
catalog.cattle.io/certified: rancher
catalog.cattle.io/display-name: Harvester Cloud Provider
catalog.cattle.io/kube-version: '>= 1.23.0-0'
catalog.cattle.io/namespace: kube-system
catalog.cattle.io/os: linux
catalog.cattle.io/rancher-version: '>= 2.7.0-0'
catalog.cattle.io/release-name: harvester-cloud-provider
catalog.cattle.io/ui-component: harvester-cloud-provider
catalog.cattle.io/upstream-version: 0.2.0
apiVersion: v2
appVersion: v0.2.4
dependencies:
- condition: kube-vip.enabled
name: kube-vip
repository: file://dependency_charts/kube-vip
version: 0.6.4
description: A Helm chart for Harvester Cloud Provider
keywords:
- infrastructure
- harvester
maintainers:
- name: harvester
name: harvester-cloud-provider
type: application
version: 0.2.800

View File

@ -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/

View File

@ -0,0 +1,9 @@
apiVersion: v2
appVersion: v0.8.4
description: A Helm chart for kube-vip
icon: https://github.com/kube-vip/kube-vip/raw/main/kube-vip.png
maintainers:
- name: kube-vip
name: kube-vip
type: application
version: 0.6.4

View File

@ -0,0 +1,80 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "kube-vip.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 "kube-vip.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 "kube-vip.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "kube-vip.labels" -}}
helm.sh/chart: {{ include "kube-vip.chart" . }}
{{ include "kube-vip.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "kube-vip.selectorLabels" -}}
app.kubernetes.io/name: {{ include "kube-vip.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "kube-vip.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "kube-vip.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
{{/*
Convert string to boolean
*/}}
{{- define "kube-vip.toBool" -}}
{{- if eq (lower (toString .)) "true" -}}
{{- true -}}
{{- else if eq (lower (toString .)) "false" -}}
{{- false -}}
{{- else if eq (lower (toString .)) "1" -}}
{{- true -}}
{{- else if eq (lower (toString .)) "0" -}}
{{- false -}}
{{- else -}}
{{- default . false -}}
{{- end -}}
{{- end -}}

View File

@ -0,0 +1,91 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: {{ include "kube-vip.name" . }}
namespace: {{ .Release.Namespace | default "kube-system" }}
spec:
selector:
matchLabels:
{{- include "kube-vip.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "kube-vip.selectorLabels" . | nindent 8 }}
{{- with .Values.extraLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
containers:
- args:
- manager
{{- if kindIs "map" .Values.extraArgs }}
{{- range $key, $value := .Values.extraArgs }}
{{- if not (kindIs "invalid" $value) }}
- --{{ $key }}={{ tpl ($value | toString) $ }}
{{- else }}
- --{{ $key }}
{{- end }}
{{- end }}
{{- end }}
env:
{{- if eq (include "kube-vip.toBool" .Values.env.cp_enable) "true" }}
- name: vip_address
value: {{ required "A valid config.address required!" .Values.config.address}}
{{- end }}
{{- with .Values.env }}
{{- range $k, $v := . }}
{{- $name := $k }}
{{- $value := $v }}
- name: {{ quote $name }}
value: {{ quote $value }}
{{- end }}
{{- end }}
{{- with .Values.envValueFrom }}
{{- range $k, $v := . }}
{{- $name := $k }}
{{- $value := $v }}
- name: {{ quote $name }}
valueFrom:
{{- toYaml $value | nindent 14 }}
{{- end }}
{{- end }}
{{- with .Values.envFrom }}
envFrom:
{{- toYaml . | nindent 8 }}
{{- end }}
image: {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
name: kube-vip
resources:
{{- toYaml .Values.resources | nindent 10 }}
securityContext:
{{- toYaml .Values.securityContext | nindent 10 }}
{{- with .Values.volumeMounts }}
volumeMounts:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.hostAliases }}
hostAliases:
{{- toYaml . | nindent 8 }}
{{- end }}
hostNetwork: true
serviceAccountName: {{ include "kube-vip.name" . }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.volumes }}
volumes:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName }}
{{- end }}

View File

@ -0,0 +1,36 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "kube-vip.name" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "kube-vip.labels" . | nindent 4 }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
annotations:
rbac.authorization.kubernetes.io/autoupdate: "true"
name: {{ include "kube-vip.name" . }}
rules:
- apiGroups: [""]
resources: ["services", "services/status", "nodes", "endpoints"]
verbs: ["list","get","watch", "update"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["list", "get", "watch", "update", "create"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "kube-vip.name" . }}
labels:
{{- include "kube-vip.labels" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ include "kube-vip.name" . }}
subjects:
- kind: ServiceAccount
name: {{ include "kube-vip.name" . }}
namespace: {{ .Release.Namespace }}

View File

@ -0,0 +1,126 @@
# Default values for kube-vip.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
image:
repository: ghcr.io/kube-vip/kube-vip
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
# tag: "v0.7.0"
config:
address: ""
# Check https://kube-vip.io/docs/installation/flags/
env:
vip_interface: ""
vip_arp: "true"
lb_enable: "true"
lb_port: "6443"
vip_cidr: "32"
cp_enable: "false"
svc_enable: "true"
svc_election: "false"
vip_leaderelection: "false"
extraArgs: {}
# Specify additional arguments to kube-vip
# For example, to change the Prometheus HTTP server port, use the following:
# prometheusHTTPServer: "0.0.0.0:2112"
envValueFrom: {}
# Specify environment variables using valueFrom references (EnvVarSource)
# For example we can use the IP address of the pod itself as a unique value for the routerID
# bgp_routerid:
# fieldRef:
# fieldPath: status.podIP
envFrom: []
# Specify an externally created Secret(s) or ConfigMap(s) to inject environment variables
# For example an externally provisioned secret could contain the password for your upstream BGP router, such as
#
# apiVersion: v1
# data:
# bgp_peers: "<address:AS:password:multihop>"
# kind: Secret
# name: kube-vip
# namespace: kube-system
# type: Opaque
#
# - secretKeyRef:
# name: kube-vip
extraLabels: {}
# Specify extra labels to be added to DaemonSet (and therefore to Pods)
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
podAnnotations: {}
podSecurityContext: {}
# fsGroup: 2000
securityContext:
capabilities:
add:
- NET_ADMIN
- NET_RAW
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
volumes: []
# Specify additional volumes
# - hostPath:
# path: /etc/rancher/k3s/k3s.yaml
# type: File
# name: kubeconfig
volumeMounts: []
# Specify additional volume mounts
# - mountPath: /etc/kubernetes/admin.conf
# name: kubeconfig
hostAliases: []
# Specify additional host aliases
# - hostnames:
# - kubernetes
# ip: 127.0.0.1
nodeSelector: {}
tolerations:
- effect: NoSchedule
key: node-role.kubernetes.io/control-plane
operator: Exists
affinity: {}
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: node-role.kubernetes.io/master
# operator: Exists
# - matchExpressions:
# - key: node-role.kubernetes.io/control-plane
# operator: Exists
priorityClassName: ""

View File

@ -0,0 +1,3 @@
replicasCount: 1
# It's an existent but invalid kubeconfig, just for helm installation testing in kind
cloudConfigPath: "/etc/kubernetes/admin.conf"

View File

@ -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/

View File

@ -0,0 +1,9 @@
apiVersion: v2
appVersion: v0.8.4
description: A Helm chart for kube-vip
icon: https://github.com/kube-vip/kube-vip/raw/main/kube-vip.png
maintainers:
- name: kube-vip
name: kube-vip
type: application
version: 0.6.4

View File

@ -0,0 +1,80 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "kube-vip.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 "kube-vip.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 "kube-vip.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "kube-vip.labels" -}}
helm.sh/chart: {{ include "kube-vip.chart" . }}
{{ include "kube-vip.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "kube-vip.selectorLabels" -}}
app.kubernetes.io/name: {{ include "kube-vip.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "kube-vip.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "kube-vip.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
{{/*
Convert string to boolean
*/}}
{{- define "kube-vip.toBool" -}}
{{- if eq (lower (toString .)) "true" -}}
{{- true -}}
{{- else if eq (lower (toString .)) "false" -}}
{{- false -}}
{{- else if eq (lower (toString .)) "1" -}}
{{- true -}}
{{- else if eq (lower (toString .)) "0" -}}
{{- false -}}
{{- else -}}
{{- default . false -}}
{{- end -}}
{{- end -}}

View File

@ -0,0 +1,91 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: {{ include "kube-vip.name" . }}
namespace: {{ .Release.Namespace | default "kube-system" }}
spec:
selector:
matchLabels:
{{- include "kube-vip.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "kube-vip.selectorLabels" . | nindent 8 }}
{{- with .Values.extraLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
containers:
- args:
- manager
{{- if kindIs "map" .Values.extraArgs }}
{{- range $key, $value := .Values.extraArgs }}
{{- if not (kindIs "invalid" $value) }}
- --{{ $key }}={{ tpl ($value | toString) $ }}
{{- else }}
- --{{ $key }}
{{- end }}
{{- end }}
{{- end }}
env:
{{- if eq (include "kube-vip.toBool" .Values.env.cp_enable) "true" }}
- name: vip_address
value: {{ required "A valid config.address required!" .Values.config.address}}
{{- end }}
{{- with .Values.env }}
{{- range $k, $v := . }}
{{- $name := $k }}
{{- $value := $v }}
- name: {{ quote $name }}
value: {{ quote $value }}
{{- end }}
{{- end }}
{{- with .Values.envValueFrom }}
{{- range $k, $v := . }}
{{- $name := $k }}
{{- $value := $v }}
- name: {{ quote $name }}
valueFrom:
{{- toYaml $value | nindent 14 }}
{{- end }}
{{- end }}
{{- with .Values.envFrom }}
envFrom:
{{- toYaml . | nindent 8 }}
{{- end }}
image: {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
name: kube-vip
resources:
{{- toYaml .Values.resources | nindent 10 }}
securityContext:
{{- toYaml .Values.securityContext | nindent 10 }}
{{- with .Values.volumeMounts }}
volumeMounts:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.hostAliases }}
hostAliases:
{{- toYaml . | nindent 8 }}
{{- end }}
hostNetwork: true
serviceAccountName: {{ include "kube-vip.name" . }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.volumes }}
volumes:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName }}
{{- end }}

View File

@ -0,0 +1,36 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "kube-vip.name" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "kube-vip.labels" . | nindent 4 }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
annotations:
rbac.authorization.kubernetes.io/autoupdate: "true"
name: {{ include "kube-vip.name" . }}
rules:
- apiGroups: [""]
resources: ["services", "services/status", "nodes", "endpoints"]
verbs: ["list","get","watch", "update"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["list", "get", "watch", "update", "create"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "kube-vip.name" . }}
labels:
{{- include "kube-vip.labels" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ include "kube-vip.name" . }}
subjects:
- kind: ServiceAccount
name: {{ include "kube-vip.name" . }}
namespace: {{ .Release.Namespace }}

View File

@ -0,0 +1,126 @@
# Default values for kube-vip.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
image:
repository: ghcr.io/kube-vip/kube-vip
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
# tag: "v0.7.0"
config:
address: ""
# Check https://kube-vip.io/docs/installation/flags/
env:
vip_interface: ""
vip_arp: "true"
lb_enable: "true"
lb_port: "6443"
vip_cidr: "32"
cp_enable: "false"
svc_enable: "true"
svc_election: "false"
vip_leaderelection: "false"
extraArgs: {}
# Specify additional arguments to kube-vip
# For example, to change the Prometheus HTTP server port, use the following:
# prometheusHTTPServer: "0.0.0.0:2112"
envValueFrom: {}
# Specify environment variables using valueFrom references (EnvVarSource)
# For example we can use the IP address of the pod itself as a unique value for the routerID
# bgp_routerid:
# fieldRef:
# fieldPath: status.podIP
envFrom: []
# Specify an externally created Secret(s) or ConfigMap(s) to inject environment variables
# For example an externally provisioned secret could contain the password for your upstream BGP router, such as
#
# apiVersion: v1
# data:
# bgp_peers: "<address:AS:password:multihop>"
# kind: Secret
# name: kube-vip
# namespace: kube-system
# type: Opaque
#
# - secretKeyRef:
# name: kube-vip
extraLabels: {}
# Specify extra labels to be added to DaemonSet (and therefore to Pods)
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
podAnnotations: {}
podSecurityContext: {}
# fsGroup: 2000
securityContext:
capabilities:
add:
- NET_ADMIN
- NET_RAW
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
volumes: []
# Specify additional volumes
# - hostPath:
# path: /etc/rancher/k3s/k3s.yaml
# type: File
# name: kubeconfig
volumeMounts: []
# Specify additional volume mounts
# - mountPath: /etc/kubernetes/admin.conf
# name: kubeconfig
hostAliases: []
# Specify additional host aliases
# - hostnames:
# - kubernetes
# ip: 127.0.0.1
nodeSelector: {}
tolerations:
- effect: NoSchedule
key: node-role.kubernetes.io/control-plane
operator: Exists
affinity: {}
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: node-role.kubernetes.io/master
# operator: Exists
# - matchExpressions:
# - key: node-role.kubernetes.io/control-plane
# operator: Exists
priorityClassName: ""

View File

@ -0,0 +1,11 @@
categories:
- infrastructure
- harvester
namespace: kube-system
questions:
- variable: cloudConfigPath
label: Cloud config file path
description: "Specify the path of the cloud config."
group: "Default"
type: string
default: "/etc/kubernetes/cloud-config"

View File

@ -0,0 +1,69 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "harvester-cloud-provider.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 "harvester-cloud-provider.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 "harvester-cloud-provider.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "harvester-cloud-provider.labels" -}}
helm.sh/chart: {{ include "harvester-cloud-provider.chart" . }}
{{ include "harvester-cloud-provider.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "harvester-cloud-provider.selectorLabels" -}}
app.kubernetes.io/name: {{ include "harvester-cloud-provider.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "harvester-cloud-provider.serviceAccountName" -}}
{{- default (include "harvester-cloud-provider.fullname" .) .Values.serviceAccount.name }}
{{- end }}
{{/*
Global system default registry
*/}}
{{- define "system_default_registry" -}}
{{- if .Values.global.cattle.systemDefaultRegistry -}}
{{- printf "%s/" .Values.global.cattle.systemDefaultRegistry -}}
{{- else -}}
{{- "" -}}
{{- end -}}
{{- end -}}

View File

@ -0,0 +1,57 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: {{ .Release.Namespace }}
labels:
{{- include "harvester-cloud-provider.labels" . | nindent 4 }}
name: {{ include "harvester-cloud-provider.name" . }}
spec:
replicas: {{ .Values.replicasCount}}
selector:
matchLabels:
{{- include "harvester-cloud-provider.selectorLabels" . | nindent 6 }}
strategy:
rollingUpdate:
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
labels:
{{- include "harvester-cloud-provider.selectorLabels" . | nindent 8 }}
spec:
serviceAccountName: {{ include "harvester-cloud-provider.name" . }}
hostNetwork: true
containers:
- name: {{ include "harvester-cloud-provider.name" . }}
image: {{ template "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
- --cloud-config=/etc/kubernetes/cloud-config
{{- if ne .Values.global.cattle.clusterName "" }}
- --cluster-name={{ .Values.global.cattle.clusterName }}
{{- end }}
command:
- harvester-cloud-provider
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- mountPath: /etc/kubernetes/cloud-config
name: cloud-config
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: cloud-config
hostPath:
path: {{ required "A valid cloudConfigPath is required!" .Values.cloudConfigPath }}
type: File

View File

@ -0,0 +1,37 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "harvester-cloud-provider.name" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "harvester-cloud-provider.labels" . | nindent 4 }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "harvester-cloud-provider.name" . }}
rules:
- apiGroups: [ "" ]
resources: [ "services", "nodes", "events" ]
verbs: [ "get", "watch", "list", "update", "create", "patch" ]
- apiGroups: [ "" ]
resources: [ "nodes/status", "services/status" ]
verbs: [ "update", "patch" ]
- apiGroups: [ "coordination.k8s.io" ]
resources: [ "leases" ]
verbs: [ "get", "update", "create" ]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "harvester-cloud-provider.name" . }}
labels:
{{- include "harvester-cloud-provider.labels" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ include "harvester-cloud-provider.name" . }}
subjects:
- kind: ServiceAccount
name: {{ include "harvester-cloud-provider.name" . }}
namespace: {{ .Release.Namespace }}

View File

@ -0,0 +1,106 @@
# Default values for harvester-cloud-provider.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicasCount: 1
image:
repository: rancher/harvester-cloud-provider
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: v0.2.4
cloudConfigPath: "/etc/kubernetes/cloud-config"
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
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
nodeSelector:
kubernetes.io/os: linux
tolerations:
- effect: NoSchedule
key: node.cloudprovider.kubernetes.io/uninitialized
operator: Equal
value: "true"
- effect: NoSchedule
key: node-role.kubernetes.io/control-plane
operator: Equal
- effect: NoExecute
key: node-role.kubernetes.io/etcd
operator: Equal
- key: cattle.io/os
operator: Equal
value: "linux"
effect: NoSchedule
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- harvester-cloud-provider
topologyKey: kubernetes.io/hostname
global:
cattle:
systemDefaultRegistry: ""
clusterName: ""
kube-vip:
enabled: true
tolerations:
- effect: NoSchedule
key: node-role.kubernetes.io/control-plane
operator: Exists
- effect: NoExecute
key: node-role.kubernetes.io/etcd
operator: Exists
image:
repository: rancher/mirrored-kube-vip-kube-vip-iptables
tag: v0.8.7
env:
vip_interface: ""
vip_arp: "true"
lb_enable: "true"
lb_port: "6443"
vip_cidr: "32"
cp_enable: "false"
svc_enable: "true"
vip_leaderelection: "false"
enable_service_security: "true"
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
# For RKE1
- matchExpressions:
- key: node-role.kubernetes.io/controlplane
operator: Exists
# For RKE2
- matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: Exists

View File

@ -15,6 +15,36 @@ entries:
- assets/rke2-flannel/flannel-v0.24.000.tgz
version: v0.24.000
harvester-cloud-provider:
- annotations:
catalog.cattle.io/certified: rancher
catalog.cattle.io/display-name: Harvester Cloud Provider
catalog.cattle.io/kube-version: '>= 1.23.0-0'
catalog.cattle.io/namespace: kube-system
catalog.cattle.io/os: linux
catalog.cattle.io/rancher-version: '>= 2.7.0-0'
catalog.cattle.io/release-name: harvester-cloud-provider
catalog.cattle.io/ui-component: harvester-cloud-provider
catalog.cattle.io/upstream-version: 0.2.0
apiVersion: v2
appVersion: v0.2.4
created: "2025-01-09T03:11:02.010703005Z"
dependencies:
- condition: kube-vip.enabled
name: kube-vip
repository: file://dependency_charts/kube-vip
version: 0.6.4
description: A Helm chart for Harvester Cloud Provider
digest: 03aa0d8797614caae19d002bb05a2b267d26dbead6320b4c2973167f5644176a
keywords:
- infrastructure
- harvester
maintainers:
- name: harvester
name: harvester-cloud-provider
type: application
urls:
- assets/harvester-cloud-provider/harvester-cloud-provider-0.2.800.tgz
version: 0.2.800
- annotations:
catalog.cattle.io/certified: rancher
catalog.cattle.io/display-name: Harvester Cloud Provider