Skip to content

Commit

Permalink
Merge pull request #69 from ccremer/hostalias
Browse files Browse the repository at this point in the history
[zfs-provisioner] Add possibility to configure Host Aliases
  • Loading branch information
ccremer authored May 23, 2021
2 parents 4c65a78 + 24a4181 commit 250d12d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/kubernetes-zfs-provisioner/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ description: Dynamic ZFS persistent volume provisioner for Kubernetes

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 1.0.0
version: 1.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
Expand Down
5 changes: 3 additions & 2 deletions charts/kubernetes-zfs-provisioner/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# kubernetes-zfs-provisioner

![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square)
![Version: 1.1.0](https://img.shields.io/badge/Version-1.1.0-informational?style=flat-square)

Dynamic ZFS persistent volume provisioner for Kubernetes

Expand All @@ -27,6 +27,7 @@ There are some breaking changes from 0.x to 1.x versions.
| affinity | object | `{}` | |
| env | object | `{}` | A dict with KEY: VALUE pairs |
| fullnameOverride | string | `""` | |
| hostAliases | object | `{}` | A dict with `{ip, hostnames array}` to configure custom entries in /etc/hosts. See [values.yaml](./values.yaml) for an example. |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.registry | string | `"quay.io"` | Container image registry |
| image.repository | string | `"ccremer/zfs-provisioner"` | Location of the container image |
Expand All @@ -47,7 +48,7 @@ There are some breaking changes from 0.x to 1.x versions.
| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
| ssh.config | string | `""` | **Required.** ssh_config(5)-compatible file content to configure SSH options when connecting |
| ssh.externalSecretName | string | `""` | If SSH secrets are managed externally, specify the name |
| ssh.identities | object | `{}` | **Required.** Provide a private key for each SSH identity, see values.yaml for an example |
| ssh.identities | object | `{}` | **Required.** Provide a private key for each SSH identity. See [values.yaml](./values.yaml) for an example |
| ssh.knownHosts | list | `[]` | **Required.** List of {host, pubKey} dicts where the public key of each host is configured |
| ssh.mountPath | string | `"/home/zfs/.ssh"` | The path where the SSH config and identities are mounted |
| storageClass.classes | list | `[]` | Storage classes to create. See [values.yaml](values.yaml) for an example. |
Expand Down
10 changes: 10 additions & 0 deletions charts/kubernetes-zfs-provisioner/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@ spec:
mountPath: {{ .Values.ssh.mountPath }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.hostAliases }}
hostAliases:
{{- range $ip, $hostnames := . }}
- ip: {{ $ip }}
hostnames:
{{- range . }}
- {{ . }}
{{- end }}
{{- end }}
{{- end }}
volumes:
{{- with .Values.ssh }}
- name: ssh
Expand Down
9 changes: 8 additions & 1 deletion charts/kubernetes-zfs-provisioner/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ ssh:
# IdentityFile ~/.ssh/id_ed25519
# User zfs

# -- **Required.** Provide a private key for each SSH identity, see values.yaml for an example
# -- **Required.** Provide a private key for each SSH identity.
# See [values.yaml](./values.yaml) for an example
identities: {}
# id_ed25519: |
# -----BEGIN OPENSSH PRIVATE KEY-----
Expand All @@ -70,6 +71,12 @@ ssh:
# -- A dict with KEY: VALUE pairs
env: {}

# -- A dict with `{ip, hostnames array}` to configure custom entries in /etc/hosts.
# See [values.yaml](./values.yaml) for an example.
hostAliases: {}
# 192.168.1.1:
# - my-custom-host.name

serviceAccount:
# -- Specifies whether a service account should be created
create: true
Expand Down

0 comments on commit 250d12d

Please sign in to comment.