Skip to content

Commit 7258c56

Browse files
committed
Upgrade proxmox-CCM to 0.5.1 and proxmox-csi-plugin to 0.8.2
1 parent f76bc8d commit 7258c56

File tree

21 files changed

+456
-97
lines changed

21 files changed

+456
-97
lines changed
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
apiVersion: v2
22
name: proxmox-cloud-controller-manager
3-
description: A Helm chart for Kubernetes
3+
description: Cloud Controller Manager plugin for Proxmox
44
type: application
55
home: https://github.com/sergelogvinov/proxmox-cloud-controller-manager
6-
icon: https://proxmox.com/templates/yoo_nano2/favicon.ico
6+
icon: https://raw.githubusercontent.com/sergelogvinov/proxmox-cloud-controller-manager/main/charts/proxmox-cloud-controller-manager/icon.png
77
sources:
8-
- https://github.com/sergelogvinov/proxmox-cloud-controller-manager
8+
- https://github.com/sergelogvinov/proxmox-cloud-controller-manager
99
keywords:
10-
- ccm
10+
- ccm
11+
- proxmox
12+
- kubernetes
1113
maintainers:
12-
- name: sergelogvinov
13-
url: https://github.com/sergelogvinov
14-
14+
- name: sergelogvinov
15+
url: https://github.com/sergelogvinov
1516
# This is the chart version. This version number should be incremented each time you make changes
1617
# to the chart and its templates, including the app version.
1718
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.1.6
19-
19+
version: 0.2.8
2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
# It is recommended to use it with quotes.
24-
appVersion: v0.2.0
24+
appVersion: v0.5.1

packages/system/proxmox-csi/charts/proxmox-cloud-controller-manager/README.md

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
# proxmox-cloud-controller-manager
22

3-
![Version: 0.1.6](https://img.shields.io/badge/Version-0.1.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.2.0](https://img.shields.io/badge/AppVersion-v0.2.0-informational?style=flat-square)
3+
![Version: 0.2.8](https://img.shields.io/badge/Version-0.2.8-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.5.1](https://img.shields.io/badge/AppVersion-v0.5.1-informational?style=flat-square)
44

5-
A Helm chart for Kubernetes
5+
Cloud Controller Manager plugin for Proxmox
6+
7+
The Cloud Controller Manager (CCM) is responsible for managing node resources in cloud-based Kubernetes environments.
8+
9+
Key functions of the Cloud Controller Manager:
10+
- `Node Management`: It manages nodes by initializing new nodes when they join the cluster (e.g., during scaling up) and removing nodes when they are no longer needed (e.g., during scaling down).
11+
- `Cloud-Specific Operations`: The CCM ensures that the cloud provider's API is integrated into the Kubernetes cluster to control and automate tasks like load balancing, storage provisioning, and node lifecycle management.
612

713
**Homepage:** <https://github.com/sergelogvinov/proxmox-cloud-controller-manager>
814

@@ -16,7 +22,22 @@ A Helm chart for Kubernetes
1622

1723
* <https://github.com/sergelogvinov/proxmox-cloud-controller-manager>
1824

19-
Example:
25+
## Requirements
26+
27+
You need to set `--cloud-provider=external` in the kubelet argument for all nodes in the cluster.
28+
29+
## Proxmox permissions
30+
31+
```shell
32+
# Create role CCM
33+
pveum role add CCM -privs "VM.Audit"
34+
# Create user and grant permissions
35+
pveum user add kubernetes@pve
36+
pveum aclmod / -user kubernetes@pve -role CCM
37+
pveum user token add kubernetes@pve ccm -privsep 0
38+
```
39+
40+
## Helm values example
2041

2142
```yaml
2243
# proxmox-ccm.yaml
@@ -35,8 +56,13 @@ enabledControllers:
3556
- cloud-node-lifecycle
3657

3758
# Deploy CCM only on control-plane nodes
38-
nodeSelector:
39-
node-role.kubernetes.io/control-plane: ""
59+
affinity:
60+
nodeAffinity:
61+
requiredDuringSchedulingIgnoredDuringExecution:
62+
nodeSelectorTerms:
63+
- matchExpressions:
64+
- key: node-role.kubernetes.io/control-plane
65+
operator: Exists
4066
tolerations:
4167
- key: node-role.kubernetes.io/control-plane
4268
effect: NoSchedule
@@ -46,7 +72,7 @@ Deploy chart:
4672
4773
```shell
4874
helm upgrade -i --namespace=kube-system -f proxmox-ccm.yaml \
49-
proxmox-cloud-controller-manager charts/proxmox-cloud-controller-manager
75+
proxmox-cloud-controller-manager oci://ghcr.io/sergelogvinov/charts/proxmox-cloud-controller-manager
5076
```
5177

5278
## Values
@@ -68,14 +94,16 @@ helm upgrade -i --namespace=kube-system -f proxmox-ccm.yaml \
6894
| config | object | `{"clusters":[]}` | Proxmox cluster config. |
6995
| serviceAccount | object | `{"annotations":{},"create":true,"name":""}` | Pods Service Account. ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ |
7096
| priorityClassName | string | `"system-cluster-critical"` | CCM pods' priorityClassName. |
97+
| initContainers | list | `[]` | Add additional init containers to the CCM pods. ref: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ |
98+
| hostAliases | list | `[]` | hostAliases Deployment pod host aliases ref: https://kubernetes.io/docs/tasks/network/customize-hosts-file-for-pods/ |
7199
| podAnnotations | object | `{}` | Annotations for data pods. ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ |
72100
| podSecurityContext | object | `{"fsGroup":10258,"fsGroupChangePolicy":"OnRootMismatch","runAsGroup":10258,"runAsNonRoot":true,"runAsUser":10258}` | Pods Security Context. ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod |
73101
| securityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"seccompProfile":{"type":"RuntimeDefault"}}` | Container Security Context. ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod |
74102
| resources | object | `{"requests":{"cpu":"10m","memory":"32Mi"}}` | Resource requests and limits. ref: https://kubernetes.io/docs/user-guide/compute-resources/ |
75-
| updateStrategy | object | `{"rollingUpdate":{"maxUnavailable":1},"type":"RollingUpdate"}` | Deployment update stategy type. ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#updating-a-deployment |
103+
| useDaemonSet | bool | `false` | Deploy CCM in Daemonset mode. CCM will use hostNetwork. It allows to use CCM without CNI plugins. |
104+
| updateStrategy | object | `{"rollingUpdate":{"maxUnavailable":1},"type":"RollingUpdate"}` | Deployment update strategy type. ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#updating-a-deployment |
76105
| nodeSelector | object | `{}` | Node labels for data pods assignment. ref: https://kubernetes.io/docs/user-guide/node-selection/ |
77106
| tolerations | list | `[{"effect":"NoSchedule","key":"node-role.kubernetes.io/control-plane","operator":"Exists"},{"effect":"NoSchedule","key":"node.cloudprovider.kubernetes.io/uninitialized","operator":"Exists"}]` | Tolerations for data pods assignment. ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ |
78107
| affinity | object | `{}` | Affinity for data pods assignment. ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity |
79-
80-
----------------------------------------------
81-
Autogenerated from chart metadata using [helm-docs v1.11.2](https://github.com/norwoodj/helm-docs/releases/v1.11.2)
108+
| extraVolumes | list | `[]` | Additional volumes for Pods |
109+
| extraVolumeMounts | list | `[]` | Additional volume mounts for Pods |

packages/system/proxmox-csi/charts/proxmox-cloud-controller-manager/README.md.gotmpl

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66

77
{{ template "chart.description" . }}
88

9+
The Cloud Controller Manager (CCM) is responsible for managing node resources in cloud-based Kubernetes environments.
10+
11+
Key functions of the Cloud Controller Manager:
12+
- `Node Management`: It manages nodes by initializing new nodes when they join the cluster (e.g., during scaling up) and removing nodes when they are no longer needed (e.g., during scaling down).
13+
- `Cloud-Specific Operations`: The CCM ensures that the cloud provider's API is integrated into the Kubernetes cluster to control and automate tasks like load balancing, storage provisioning, and node lifecycle management.
14+
915
{{ template "chart.homepageLine" . }}
1016

1117
{{ template "chart.maintainersSection" . }}
@@ -14,7 +20,22 @@
1420

1521
{{ template "chart.requirementsSection" . }}
1622

17-
Example:
23+
## Requirements
24+
25+
You need to set `--cloud-provider=external` in the kubelet argument for all nodes in the cluster.
26+
27+
## Proxmox permissions
28+
29+
```shell
30+
# Create role CCM
31+
pveum role add CCM -privs "VM.Audit"
32+
# Create user and grant permissions
33+
pveum user add kubernetes@pve
34+
pveum aclmod / -user kubernetes@pve -role CCM
35+
pveum user token add kubernetes@pve ccm -privsep 0
36+
```
37+
38+
## Helm values example
1839

1940
```yaml
2041
# proxmox-ccm.yaml
@@ -33,8 +54,13 @@ enabledControllers:
3354
- cloud-node-lifecycle
3455

3556
# Deploy CCM only on control-plane nodes
36-
nodeSelector:
37-
node-role.kubernetes.io/control-plane: ""
57+
affinity:
58+
nodeAffinity:
59+
requiredDuringSchedulingIgnoredDuringExecution:
60+
nodeSelectorTerms:
61+
- matchExpressions:
62+
- key: node-role.kubernetes.io/control-plane
63+
operator: Exists
3864
tolerations:
3965
- key: node-role.kubernetes.io/control-plane
4066
effect: NoSchedule
@@ -44,9 +70,7 @@ Deploy chart:
4470

4571
```shell
4672
helm upgrade -i --namespace=kube-system -f proxmox-ccm.yaml \
47-
proxmox-cloud-controller-manager charts/proxmox-cloud-controller-manager
73+
proxmox-cloud-controller-manager oci://ghcr.io/sergelogvinov/charts/proxmox-cloud-controller-manager
4874
```
4975

5076
{{ template "chart.valuesSection" . }}
51-
52-
{{ template "helm-docs.versionFooter" . }}

packages/system/proxmox-csi/charts/proxmox-cloud-controller-manager/ci/values.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
21
image:
32
repository: ghcr.io/sergelogvinov/proxmox-cloud-controller-manager
43
pullPolicy: Always
54
tag: edge
65

7-
nodeSelector:
8-
node-role.kubernetes.io/control-plane: ""
6+
affinity:
7+
nodeAffinity:
8+
requiredDuringSchedulingIgnoredDuringExecution:
9+
nodeSelectorTerms:
10+
- matchExpressions:
11+
- key: node-role.kubernetes.io/control-plane
12+
operator: Exists
913

1014
logVerbosityLevel: 4
1115

Loading

packages/system/proxmox-csi/charts/proxmox-cloud-controller-manager/templates/deployment.yaml

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11
apiVersion: apps/v1
2+
{{- if .Values.useDaemonSet }}
3+
kind: DaemonSet
4+
{{- else }}
25
kind: Deployment
6+
{{- end }}
37
metadata:
48
name: {{ include "proxmox-cloud-controller-manager.fullname" . }}
59
labels:
610
{{- include "proxmox-cloud-controller-manager.labels" . | nindent 4 }}
711
namespace: {{ .Release.Namespace }}
812
spec:
13+
{{- if not .Values.useDaemonSet }}
914
replicas: {{ .Values.replicaCount }}
1015
strategy:
1116
type: {{ .Values.updateStrategy.type }}
17+
{{- else }}
18+
updateStrategy:
19+
type: {{ .Values.updateStrategy.type }}
20+
{{- end }}
1221
selector:
1322
matchLabels:
1423
{{- include "proxmox-cloud-controller-manager.selectorLabels" . | nindent 6 }}
@@ -35,6 +44,15 @@ spec:
3544
serviceAccountName: {{ include "proxmox-cloud-controller-manager.serviceAccountName" . }}
3645
securityContext:
3746
{{- toYaml .Values.podSecurityContext | nindent 8 }}
47+
{{- if .Values.useDaemonSet }}
48+
dnsPolicy: ClusterFirstWithHostNet
49+
hostNetwork: true
50+
{{- end }}
51+
{{- with .Values.hostAliases }}
52+
hostAliases:
53+
{{- toYaml . | nindent 8 }}
54+
{{- end }}
55+
initContainers: {{- toYaml .Values.initContainers | nindent 8 }}
3856
containers:
3957
- name: {{ .Chart.Name }}
4058
securityContext:
@@ -49,13 +67,18 @@ spec:
4967
- --leader-elect-resource-name=cloud-controller-manager-proxmox
5068
- --use-service-account-credentials
5169
- --secure-port=10258
70+
- --authorization-always-allow-paths=/healthz,/livez,/readyz,/metrics
5271
{{- with .Values.extraArgs }}
5372
{{- toYaml . | nindent 12 }}
5473
{{- end }}
74+
ports:
75+
- name: metrics
76+
containerPort: 10258
77+
protocol: TCP
5578
livenessProbe:
5679
httpGet:
5780
path: /healthz
58-
port: 10258
81+
port: metrics
5982
scheme: HTTPS
6083
initialDelaySeconds: 20
6184
periodSeconds: 30
@@ -66,25 +89,44 @@ spec:
6689
- name: cloud-config
6790
mountPath: /etc/proxmox
6891
readOnly: true
92+
{{- with .Values.extraVolumeMounts }}
93+
{{- toYaml . | nindent 12 }}
94+
{{- end }}
6995
{{- with .Values.nodeSelector }}
7096
nodeSelector:
7197
{{- toYaml . | nindent 8 }}
7298
{{- end }}
73-
{{- with .Values.affinity }}
7499
affinity:
100+
{{- with .Values.affinity }}
75101
{{- toYaml . | nindent 8 }}
102+
{{- else }}
103+
podAntiAffinity:
104+
preferredDuringSchedulingIgnoredDuringExecution:
105+
- podAffinityTerm:
106+
labelSelector:
107+
matchLabels:
108+
{{- include "proxmox-cloud-controller-manager.selectorLabels" . | nindent 20 }}
109+
topologyKey: topology.kubernetes.io/zone
110+
weight: 1
76111
{{- end }}
77-
{{- with .Values.tolerations }}
78112
tolerations:
113+
{{- with .Values.tolerations }}
79114
{{- toYaml . | nindent 8 }}
80115
{{- end }}
116+
{{- if .Values.useDaemonSet }}
117+
- effect: NoSchedule
118+
key: node.kubernetes.io/not-ready
119+
operator: Exists
120+
{{- end }}
121+
{{- if not .Values.useDaemonSet }}
81122
topologySpreadConstraints:
82123
- maxSkew: 1
83124
topologyKey: kubernetes.io/hostname
84125
whenUnsatisfiable: DoNotSchedule
85126
labelSelector:
86127
matchLabels:
87128
{{- include "proxmox-cloud-controller-manager.selectorLabels" . | nindent 14 }}
129+
{{- end }}
88130
volumes:
89131
{{- if .Values.existingConfigSecret }}
90132
- name: cloud-config
@@ -100,3 +142,6 @@ spec:
100142
secretName: {{ include "proxmox-cloud-controller-manager.fullname" . }}
101143
defaultMode: 416
102144
{{- end }}
145+
{{- with .Values.extraVolumes }}
146+
{{- toYaml . | nindent 8 }}
147+
{{- end }}

packages/system/proxmox-csi/charts/proxmox-cloud-controller-manager/values.edge.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
21
image:
32
pullPolicy: Always
43
tag: edge
54

6-
nodeSelector:
7-
node-role.kubernetes.io/control-plane: ""
5+
affinity:
6+
nodeAffinity:
7+
requiredDuringSchedulingIgnoredDuringExecution:
8+
nodeSelectorTerms:
9+
- matchExpressions:
10+
- key: node-role.kubernetes.io/control-plane
11+
operator: Exists
812

913
logVerbosityLevel: 4
1014

packages/system/proxmox-csi/charts/proxmox-cloud-controller-manager/values.talos.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
2-
nodeSelector:
3-
node-role.kubernetes.io/control-plane: ""
1+
affinity:
2+
nodeAffinity:
3+
requiredDuringSchedulingIgnoredDuringExecution:
4+
nodeSelectorTerms:
5+
- matchExpressions:
6+
- key: node-role.kubernetes.io/control-plane
7+
operator: Exists
48

59
logVerbosityLevel: 4
610

0 commit comments

Comments
 (0)