Skip to content
This repository was archived by the owner on Aug 22, 2022. It is now read-only.

Commit

Permalink
[common] Version 4.3.0 (#112)
Browse files Browse the repository at this point in the history
* Add support for runtimeClassName configuration (#111)

* bump chart version to 4.3.0

* Improve documentation for configuring environment (#115)

* [common] Add podManagementPolicy to StatefulSet (#119)

Co-authored-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <[email protected]>
Co-authored-by: mdallaire <[email protected]>
Co-authored-by: Mathieu Dallaire <[email protected]>
Co-authored-by: Sylvain Pasche <[email protected]>
Co-authored-by: Benjamin Runnels <[email protected]>
  • Loading branch information
5 people authored Jan 3, 2022
1 parent 7da3946 commit 5867d5e
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 7 deletions.
2 changes: 1 addition & 1 deletion charts/stable/common/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: common
description: Function library for k8s-at-home charts
type: library
version: 4.2.0
version: 4.3.0
kubeVersion: ">=1.16.0-0"
keywords:
- k8s-at-home
Expand Down
18 changes: 16 additions & 2 deletions charts/stable/common/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# common

![Version: 4.2.0](https://img.shields.io/badge/Version-4.2.0-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square)
![Version: 4.3.0](https://img.shields.io/badge/Version-4.3.0-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square)

Function library for k8s-at-home charts

Expand Down Expand Up @@ -121,6 +121,7 @@ N/A
| controller.annotations | object | `{}` | Set annotations on the deployment/statefulset/daemonset |
| controller.enabled | bool | `true` | enable the controller. |
| controller.labels | object | `{}` | Set labels on the deployment/statefulset/daemonset |
| controller.podManagementPolicy | string | `nil` | Set statefulset podManagementPolicy, valid values are Parallel and OrderedReady (default). |
| controller.replicas | int | `1` | Number of desired pods |
| controller.revisionHistoryLimit | int | `3` | ReplicaSet revision history limit |
| controller.rollingUpdate.partition | string | `nil` | Set statefulset RollingUpdate partition |
Expand All @@ -131,7 +132,8 @@ N/A
| dnsConfig | object | `{}` | Optional DNS settings, configuring the ndots option may resolve nslookup issues on some Kubernetes setups. |
| dnsPolicy | string | `nil` | Defaults to "ClusterFirst" if hostNetwork is false and "ClusterFirstWithHostNet" if hostNetwork is true. |
| enableServiceLinks | bool | `true` | Enable/disable the generation of environment variables for services. [[ref]](https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/#accessing-the-service) |
| env | string | `nil` | Main environment variables. Template enabled. Syntax options: A) TZ: UTC B) PASSWD: '{{ .Release.Name }}' C) PASSWD: envFrom: ... D) - name: TZ value: UTC E) - name: TZ value: '{{ .Release.Name }}' |
| env | string | `nil` | Main environment variables. Template enabled. Syntax options: A) TZ: UTC B) PASSWD: '{{ .Release.Name }}' C) PASSWD: configMapKeyRef: name: config-map-name key: key-name D) PASSWD: valueFrom: secretKeyRef: name: secret-name key: key-name ... E) - name: TZ value: UTC F) - name: TZ value: '{{ .Release.Name }}' |
| envFrom | list | `[]` | Secrets and/or ConfigMaps that will be loaded as environment variables. [[ref]](https://unofficial-kubernetes.readthedocs.io/en/latest/tasks/configure-pod-container/configmap/#use-case-consume-configmap-in-environment-variables) |
| global.fullnameOverride | string | `nil` | Set the entire name definition |
| global.nameOverride | string | `nil` | Set an override for the prefix of the fullname |
| hostAliases | list | `[]` | Use hostAliases to add custom entries to /etc/hosts - mapping IP addresses to hostnames. [[ref]](https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/) |
Expand Down Expand Up @@ -190,6 +192,7 @@ N/A
| probes.startup.enabled | bool | `true` | Enable the startup probe |
| probes.startup.spec | object | See below | The spec field contains the values for the default startupProbe. If you selected `custom: true`, this field holds the definition of the startupProbe. |
| resources | object | `{}` | Set the resource requests / limits for the main container. |
| runtimeClassName | string | `nil` | Allow specifying a runtimeClassName other than the default one (ie: nvidia) |
| schedulerName | string | `nil` | Allows specifying a custom scheduler name |
| secret | object | `{}` | Use this to populate a secret with the values you specify. Be aware that these values are not encrypted by default, and could therefore visible to anybody with access to the values.yaml file. |
| securityContext | object | `{}` | Configure the Security Context for the main container |
Expand Down Expand Up @@ -224,6 +227,17 @@ All notable changes to this library Helm chart will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

### [4.3.0]

#### Added

- Support setting `podManagementPolicy` on StatefulSet
- Support setting the `runtimeClassName` of pods

#### Changed

- Improved environment variables documentation to correctly reflect the available syntax options.

### [4.2.0]

#### Added
Expand Down
11 changes: 11 additions & 0 deletions charts/stable/common/README_CHANGELOG.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@ All notable changes to this library Helm chart will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

### [4.3.0]

#### Added

- Support setting `podManagementPolicy` on StatefulSet
- Support setting the `runtimeClassName` of pods

#### Changed

- Improved environment variables documentation to correctly reflect the available syntax options.

### [4.2.0]

#### Added
Expand Down
1 change: 1 addition & 0 deletions charts/stable/common/templates/_statefulset.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ metadata:
spec:
revisionHistoryLimit: {{ .Values.controller.revisionHistoryLimit }}
replicas: {{ .Values.controller.replicas }}
podManagementPolicy: {{ default "OrderedReady" .Values.controller.podManagementPolicy }}
{{- $strategy := default "RollingUpdate" .Values.controller.strategy }}
{{- if and (ne $strategy "OnDelete") (ne $strategy "RollingUpdate") }}
{{- fail (printf "Not a valid strategy type for StatefulSet (%s)" $strategy) }}
Expand Down
3 changes: 3 additions & 0 deletions charts/stable/common/templates/lib/controller/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ securityContext:
{{- end }}
{{- with .Values.priorityClassName }}
priorityClassName: {{ . }}
{{- end }}
{{- with .Values.runtimeClassName }}
runtimeClassName: {{ . }}
{{- end }}
{{- with .Values.schedulerName }}
schedulerName: {{ . }}
Expand Down
28 changes: 24 additions & 4 deletions charts/stable/common/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ controller:
partition:
# -- ReplicaSet revision history limit
revisionHistoryLimit: 3
# -- Set statefulset podManagementPolicy, valid values are Parallel and OrderedReady (default).
podManagementPolicy:

image:
# -- image repository
Expand Down Expand Up @@ -100,17 +102,35 @@ configmap:
# A) TZ: UTC
# B) PASSWD: '{{ .Release.Name }}'
# C) PASSWD:
# envFrom:
# ...
# D) - name: TZ
# value: UTC
# configMapKeyRef:
# name: config-map-name
# key: key-name
# D) PASSWD:
# valueFrom:
# secretKeyRef:
# name: secret-name
# key: key-name
# ...
# E) - name: TZ
# value: UTC
# F) - name: TZ
# value: '{{ .Release.Name }}'
env:

# -- Secrets and/or ConfigMaps that will be loaded as environment variables.
# [[ref]](https://unofficial-kubernetes.readthedocs.io/en/latest/tasks/configure-pod-container/configmap/#use-case-consume-configmap-in-environment-variables)
envFrom: []
# - configMapRef:
# name: config-map-name
# - secretRef:
# name: secret-name

# -- Custom priority class for different treatment by the scheduler
priorityClassName: # system-node-critical

# -- Allow specifying a runtimeClassName other than the default one (ie: nvidia)
runtimeClassName: # nvidia

# -- Allows specifying a custom scheduler name
schedulerName: # awkward-dangerous-scheduler

Expand Down

0 comments on commit 5867d5e

Please sign in to comment.