Skip to content

Commit

Permalink
Test actions (#4)
Browse files Browse the repository at this point in the history
* Trigger GitHub Action

* seems to be an issue with whereabouts that needs to be updated

* remove the dry-run flag

* break out github action per chart

* added better support for autoconfig

* created new readme file with helm-docs

* always create a service account

* always create a daemonset

* always create a cluster role

* always create a cluster role

* removed annoation of configmap in favour of using auto config

* refactor node selector and tolerations

* updated notes

* added template for go docs, and updated vaules file for better help ouput

* updated chart yaml with corrected urls

* updated resources and docs for this config

* cleaned up white space for notes
  • Loading branch information
jdambly-ns authored Sep 17, 2024
1 parent ad34c24 commit 3fc1a3c
Show file tree
Hide file tree
Showing 10 changed files with 207 additions and 145 deletions.
8 changes: 4 additions & 4 deletions multus/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ name: multus
description: Multus Helm chart for Kubernetes
type: application
version: 0.1.3
home: https://github.com/intel/multus-cni
icon: https://raw.githubusercontent.com/intel/multus-cni/master/doc/images/Multus.png
home: https://github.com/k8snetworkplumbingwg/helm-charts
icon: https://raw.githubusercontent.com/k8snetworkplumbingwg/multus-cni/master/doc/images/Multus.png
sources:
- https://github.com/intel/multus-cni
- https://github.com/k8snetworkplumbingwg/multus-cni
maintainers:
- name: Network Plumbing Group
appVersion: 2.8.0
appVersion: v4.1.0
44 changes: 44 additions & 0 deletions multus/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# multus

Multus Helm chart for Kubernetes

![Version: 0.1.3](https://img.shields.io/badge/Version-0.1.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v4.1.0](https://img.shields.io/badge/AppVersion-v4.1.0-informational?style=flat-square)

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| args.additionalBinDir | string | `""` | Additional directory to include in the CNI binDir option. |
| args.cleanupConfigOnExit | bool | `false` | Cleanup configuration files on exit. |
| args.cniBinDir | string | `"/host/opt/cni/bin"` | The directory where CNI binaries are installed. |
| args.cniConfDir | string | `"/host/etc/cni/net.d"` | The directory where CNI configurations are stored. |
| args.cniVersion | string | `""` | Version of the CNI to use. |
| args.forceCNIVersion | bool | `false` | Force the use of a specific CNI version. |
| args.globalNamespaces | string | `""` | Comma-separated list of global namespaces for use with namespace isolation. |
| args.multusAutoconfigDir | string | `"/host/etc/cni/net.d"` | Directory for the Multus auto-configuration. |
| args.multusBinFile | string | `"/usr/src/multus-cni/bin/multus"` | Path to the Multus binary file. |
| args.multusCNIConfDir | string | `"/host/etc/cni/multus/net.d"` | Directory for Multus-specific CNI configurations. |
| args.multusConfFile | string | `"auto"` | The configuration file for Multus. |
| args.multusKubeConfigFileHost | string | `"/etc/cni/net.d/multus.d/multus.kubeconfig"` | Path to the kubeconfig file for Multus. |
| args.multusLogFile | string | `""` | Path to the Multus log file. |
| args.multusLogLevel | string | `""` | Log level for Multus. |
| args.multusLogToStderr | bool | `true` | Whether to log to stderr. |
| args.multusMasterCNIFileName | string | `""` | Name of the master CNI file in the Multus auto-configuration directory. |
| args.namespaceIsolation | bool | `false` | Enable namespace isolation. |
| args.overrideNetworkName | bool | `false` | Override the network name from the master CNI file. |
| args.readinessIndicatorFile | string | `""` | File used to indicate readiness. |
| args.renameConfFile | bool | `false` | Rename the master configuration file to invalidate it. |
| args.skipConfigWatch | bool | `false` | Skip watching for configuration changes. |
| args.skipMultusBinaryCopy | bool | `false` | Whether to skip copying the Multus binary file. |
| args.skipTLSVerify | bool | `false` | Skip TLS verification. |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"ghcr.io/k8snetworkplumbingwg/multus-cni"` | Repository for the Multus image. |
| image.tag | string | `"v4.1.0"` | Tag of the Multus image. |
| nodeSelector | object | `{}` | Node selector for pod assignment. |
| resources | object | `{"limits":{"cpu":"500m","memory":"128Mi"},"requests":{"cpu":"250m","memory":"128Mi"}}` | Resources for the Multus pod. |
| securityContext | object | `{"privileged":true}` | securityContext for the pod. |
| serviceAccount.name | string | `"multus"` | |
| tolerations | list | `[{"effect":"NoSchedule","operator":"Exists"}]` | Tolerations for pod assignment. |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
10 changes: 10 additions & 0 deletions multus/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{ template "chart.header" . }}
{{ template "chart.description" . }}

{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }}

{{ template "chart.requirementsSection" . }}

{{ template "chart.valuesSection" . }}

{{ template "helm-docs.versionFooter" . }}
14 changes: 0 additions & 14 deletions multus/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,25 +1,11 @@
======
{{- if or ( gt .Capabilities.KubeVersion.Major "1" ) ( ge .Capabilities.KubeVersion.Minor "16" ) }}
1. The following components have been deployed as part of this helm chart:
{{- if .Values.manifests.clusterRole }}
Cluster Role: {{ .Values.serviceAccount.name }}
{{- end}}
{{- if .Values.manifests.clusterRoleBinding }}
Cluster Role Binding: {{ .Chart.Name }}
{{- end }}
{{- if .Values.manifests.configMap }}
Config Map: {{ .Release.Name }}-{{ .Chart.Name }}-{{ .Chart.Version }}-config
{{- end }}
{{- if .Values.manifests.customResourceDefinition }}
Custom Resource Definition: network-attachment-definitions.k8s.cni.cncf.io
{{- end }}
{{- if .Values.manifests.daemonSet }}
Daemon Set: {{ .Release.Name }}-{{ .Chart.Name }}-ds
{{- end }}
{{- if .Values.manifests.serviceAccount }}
Service Account: {{ .Values.serviceAccount.name }}
{{- end }}

You can now deploy any other CNI and create its Network Attachment Defintion.
---------

Expand Down
2 changes: 0 additions & 2 deletions multus/templates/clusterRole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if or ( gt .Capabilities.KubeVersion.Major "1" ) ( ge .Capabilities.KubeVersion.Minor "16" ) }}
{{- if .Values.manifests.clusterRole }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
Expand Down Expand Up @@ -40,4 +39,3 @@ rules:
- patch
- update
{{- end }}
{{- end }}
2 changes: 0 additions & 2 deletions multus/templates/clusterRoleBinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if or ( gt .Capabilities.KubeVersion.Major "1" ) ( ge .Capabilities.KubeVersion.Minor "16" ) }}
{{- if .Values.manifests.clusterRoleBinding }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
Expand All @@ -26,4 +25,3 @@ subjects:
name: {{ .Values.serviceAccount.name }}
namespace: kube-system
{{- end }}
{{- end }}
27 changes: 0 additions & 27 deletions multus/templates/configMap.yaml

This file was deleted.

100 changes: 82 additions & 18 deletions multus/templates/daemonSet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if or ( gt .Capabilities.KubeVersion.Major "1" ) ( ge .Capabilities.KubeVersion.Minor "16" ) }}
{{- if .Values.manifests.daemonSet }}
apiVersion: apps/v1
kind: DaemonSet
metadata:
Expand All @@ -32,19 +31,20 @@ spec:
metadata:
labels:
{{- include "multus.labels" . | indent 8 }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configMap.yaml") . | sha256sum }}
spec:
priorityClassName: system-node-critical
hostNetwork: true
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
nodeSelector: {{- toYaml .Values.labels.nodeSelector | nindent 8 }}
{{- with .Values.nodeSelector }}
nodeSelector: {{ . }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
- operator: Exists
effect: NoSchedule
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ .Values.serviceAccount.name }}
containers:
- name: multus
Expand All @@ -57,21 +57,88 @@ spec:
fieldPath: spec.nodeName
command: ["/thin_entrypoint"]
args:
- "--multus-conf-file=auto"
- "--multus-autoconfig-dir=/host/etc/cni/net.d"
- "--cni-conf-dir=/host/etc/cni/net.d"
{{- if .Values.pod.resources.multus }}
resources: {{- toYaml .Values.pod.resources.multus | nindent 10 }}
{{- with .Values.args.cniBinDir }}
- --cni-bin-dir={{ . }}
{{- end }}
{{- with .Values.args.cniConfDir }}
- --cni-conf-dir={{ . }}
{{- end }}
{{- with .Values.args.cniVersion }}
- --cni-version={{ . }}
{{- end }}
{{- with .Values.args.multusConfFile }}
- --multus-conf-file={{ . }}
{{- end }}
{{- with .Values.args.multusBinFile }}
- --multus-bin-file={{ . }}
{{- end }}
{{- with .Values.args.multusCNIConfDir }}
- --multus-cni-conf-dir={{ . }}
{{- end }}
{{- with .Values.args.skipMultusBinaryCopy }}
- --skip-multus-binary-copy={{ . }}
{{- end }}
{{- with .Values.args.multusKubeConfigFileHost }}
- --multus-kubeconfig-file-host={{ . }}
{{- end }}
{{- with .Values.args.multusMasterCNIFileName }}
- --multus-master-cni-file-name={{ . }}
{{- end }}
{{- with .Values.args.namespaceIsolation }}
- --namespace-isolation={{ . }}
{{- end }}
{{- with .Values.args.globalNamespaces }}
- --global-namespaces={{ . }}
{{- end }}
{{- with .Values.args.multusAutoconfigDir }}
- --multus-autoconfig-dir={{ . }}
{{- end }}
{{- with .Values.args.multusLogToStderr }}
- --multus-log-to-stderr={{ . }}
{{- end }}
{{- with .Values.args.multusLogLevel }}
- --multus-log-level={{ . }}
{{- end }}
{{- with .Values.args.multusLogFile }}
- --multus-log-file={{ . }}
{{- end }}
{{- with .Values.args.overrideNetworkName }}
- --override-network-name={{ . }}
{{- end }}
{{- with .Values.args.cleanupConfigOnExit }}
- --cleanup-config-on-exit={{ . }}
{{- end }}
{{- with .Values.args.skipConfigWatch }}
- --skip-config-watch={{ . }}
{{- end }}
{{- with .Values.args.renameConfFile }}
- --rename-conf-file={{ . }}
{{- end }}
{{- with .Values.args.readinessIndicatorFile }}
- --readiness-indicator-file={{ . }}
{{- end }}
{{- with .Values.args.additionalBinDir }}
- --additional-bin-dir={{ . }}
{{- end }}
{{- with .Values.args.skipTLSVerify }}
- --skip-tls-verify={{ . }}
{{- end }}
{{- with .Values.forceCNIVersion }}
- --force-cni-version={{ . }}
{{- end }}
{{- with .Values.resources}}
resources:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.securityContext}}
securityContext:
privileged: true
{{- toYaml . | nindent 10 }}
{{- end }}
volumeMounts:
- name: cni
mountPath: /host/etc/cni/net.d
- name: cnibin
mountPath: /host/opt/cni/bin
- name: multus-cfg
mountPath: /tmp/multus-conf
initContainers:
- name: install-multus-binary
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
Expand All @@ -97,8 +164,5 @@ spec:
- name: cnibin
hostPath:
path: /opt/cni/bin
- name: multus-cfg
configMap:
name: {{ .Release.Name }}-{{ .Chart.Name }}-{{ .Chart.Version }}-config
{{- end }}
{{- end }}

3 changes: 1 addition & 2 deletions multus/templates/serviceAccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if or ( gt .Capabilities.KubeVersion.Major "1" ) ( ge .Capabilities.KubeVersion.Minor "16" ) }}
{{- if .Values.manifests.serviceAccount }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Values.serviceAccount.name }}
namespace: kube-system
{{- end }}
{{- end }}

Loading

0 comments on commit 3fc1a3c

Please sign in to comment.