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

Adds helm chart for heptio/ark #3795

Merged
merged 47 commits into from
Jun 14, 2018
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
65ac2e3
first commit
domcar Feb 21, 2018
f675cb1
changes SA name
domcar Feb 21, 2018
5aa0747
adds correct rbac rules
domcar Feb 21, 2018
14ea5ff
renames files; add more customizable vars
domcar Feb 21, 2018
536c688
updates readme
domcar Feb 21, 2018
4ead002
adds notes
domcar Feb 21, 2018
3f0aad2
removes config values
domcar Feb 21, 2018
d5858f5
changes email in chart
domcar Feb 21, 2018
b65504c
updates readme
domcar Feb 21, 2018
bf9b51c
test changes author
domcar Feb 21, 2018
adf608d
test change email
domcar Feb 21, 2018
e4d1e82
test change email
domcar Feb 21, 2018
9373293
adds prerequisites in readme
domcar Feb 21, 2018
d80dd98
fixes typo
domcar Feb 22, 2018
44d8acd
adds AWS
domcar Feb 22, 2018
669ce07
updates to version 0.7
domcar Feb 22, 2018
f47b895
updates version in chart
domcar Feb 22, 2018
e85c4f0
adds repo source; removes unnecessary values
domcar Feb 22, 2018
4802657
moves deployment to templates
domcar Feb 23, 2018
e6b9d24
renames folder
domcar Feb 23, 2018
ff4b980
updaates to 0.7.1
domcar Feb 23, 2018
8eb6040
creates ark sa in helpers; separates files according to object type
domcar Feb 23, 2018
261d611
updates version in chart
domcar Feb 23, 2018
61a05b8
adds home to chart
domcar Feb 23, 2018
8c74bc3
updates to v0.7.1
domcar Feb 23, 2018
bb0ff5a
modifies chart according to best practices
domcar Feb 26, 2018
e305418
removes blank line
domcar Feb 26, 2018
5463c3f
adds delete backup hook to solve issue crd backup not deleting
domcar Feb 27, 2018
fb90ec9
adjusts indentation, renames file with using hyphene
domcar Mar 13, 2018
ac6d7bc
moves folder to stable
domcar Mar 13, 2018
be5596c
remove unnecessary test condition
domcar Apr 10, 2018
2c74977
Update to v0.8.1; Add support for Azure
domcar Apr 25, 2018
e5b514f
Update readme
domcar Apr 30, 2018
e564f4e
Add annotation for kube2iam
domcar Apr 30, 2018
00d250e
Add image for hooks. Update readme
domcar Apr 30, 2018
0f7cb0a
Rename serviceaccount
domcar May 9, 2018
8984ec0
Use Get instead of Glob
domcar May 9, 2018
9b80a0b
Remove namespace
domcar May 9, 2018
00e6649
Add PullPolicy; Modify readme
domcar May 9, 2018
fb6a6fd
Rename Chart ark
domcar May 9, 2018
2af806e
Add standard labels to resources
domcar May 9, 2018
b78fceb
Add customizable tolertion and nodeselector
domcar May 9, 2018
2a9682b
Add missing labels; Use image with tag
domcar May 16, 2018
7df92c4
Implement suggestion
domcar Jun 4, 2018
6cd1fd9
Various updates
unguiculus Jun 7, 2018
d6bb35b
Merge remote-tracking branch 'upstream/master' into feature/ark
unguiculus Jun 11, 2018
6901ca2
Add missing if block around delete hook
unguiculus Jun 11, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions stable/ark-server/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# 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
*~
# Various IDEs
.project
.idea/
*.tmproj
11 changes: 11 additions & 0 deletions stable/ark-server/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
appVersion: 0.8.1
description: A Helm chart for ark-server
name: ark-server
version: 1.0.0
home: https://heptio.com/products/#heptio-ark
sources:
- https://github.com/heptio/ark
maintainers:
- name: domcar
email: d-caruso@hotmail.it
63 changes: 63 additions & 0 deletions stable/ark-server/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Ark-server

This helm chart install ark-server version v0.8.1
https://github.com/heptio/ark/tree/v0.8.1

## Premise
Helm cannot handle properly CRD becauses it has a validation mechanism that checks the installation before the CRD are actually created,
hence each resource that uses a CRD cannot be validated because the CRD doesn't exist yet!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My suggestion:

In general, Helm cannot install CRDs and resources based on these CRDs in the same Helm chart because CRDs need to be installed before CRD resources can be created and Helm cannot guarantee the correct ordering for this to work.

As a workaround, the chart creates a Config resource via post-install hook. Since resources created by hooks are not managed by Helm, a pre-delete hook removes the Config CRD when the release is deleted.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok


The trick here is to create CRD via helm chart, and only after (using a `post-install`) to install the resources with a container.
The container has the only job to execute a `kubectl create -f filename` and create the resources.

At the same time the resources created with the hook are completely transparent to Helm, that is, when you delete the
chart those resources remain there. Hence we need a sencond hook for deleting them (see hook-delete.yaml)

## Content
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove this section.

- `templates/backups.yaml`
`configs`
`schedules`
`downloadrequest` these files contain the custom resouces needed by Ark Server
- `hook_delete.yaml` and `hook_deploy.yaml` are the containers that will deploy or delete ark-server configuration
- `configmap.yaml` Configmap will be mounted to the hook container as a file and subsequently used as k8s manifest for deploy or deletion

## ConfigMap customization
Since we want to have a customizable chart it's important that the configmap is a template and not a static file.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the configmap be a template

To do this we add the keyword `tpl` when reading the file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Obsolete with my alternative suggestion.

- {{ (tpl (.Files.Glob "configuration/").AsConfig .) | indent 2 }}


## Prerequisites

### Heptio Secret
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe say "Secret for cloud provider credentials"?

Ark server needs a IAM service account in order to run, if you don't have it you must create it.
This is the guide for gcp: https://github.com/heptio/ark/blob/v0.8.1/docs/gcp-config.md#create-service-account
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend pointing to https://heptio.github.io/ark/v0.8.1/cloud-common as a starting point that contains links to configure Ark for each cloud provider.


Don't forget the step to create the secret
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be possible to have the chart create the secret with the alternative to specify an existingSecret.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the moment one can only specify an existingSecret, if you have a suggestion how Helm can create it without manual action from the User please let me know, I'd like to add this feature.

```
kubectl create secret generic cloud-credentials --namespace <ARK_NAMESPACE> --from-file cloud=credentials-ark
```

### Configuration
Please change the values.yaml according to your setup
See here for the official documentation https://github.com/heptio/ark/blob/v0.8.1/docs/config-definition.md
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


Parameter | Description | Default | Required
--- | --- | --- | ---
`cloudprovider` | Cloud provider | `nil` | yes
`bucket` | Object storage where to store backups | `nil` | yes
`region` | AWS region | `nil` | only if using AWS
`credentials` | Credentials | `nil` | Yes (not required for kube2iam)
`kube2iam` | Enable kube2iam | `false` | No
`backupSyncPeriod` | How frequently Ark queries the object storage to make sure that the appropriate Backup resources have been created for existing backup files. | `60m` | yes
`gcSyncPeriod` | How frequently Ark queries the object storage to delete backup files that have passed their TTL. | `60m` | yes
`scheduleSyncPeriod` | How frequently Ark checks its Schedule resource objects to see if a backup needs to be initiated | `1m` | yes
`restoreOnlyMode` | When RestoreOnly mode is on, functionality for backups, schedules, and expired backup deletion is turned off. Restores are made from existing backup files in object storage. | `false` | yes

## How to
```
helm install --name ark-server --namespace heptio-ark ./ark-server
```

## Remove heptio/ark
Rememebr that when you remove ark all backups remain untouched
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remember

26 changes: 26 additions & 0 deletions stable/ark-server/configuration/01-config-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: ark.heptio.com/v1
kind: Config
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about making the Config directly configurable via values.yaml? This will not tie you to a specific set of config options. Otherwise, a new chart release would be required if a new Ark release adds new options.

metadata:
namespace: {{ .Values.namespace.name }}
name: default
persistentVolumeProvider:
name: {{ .Values.configuration.cloudprovider }}
config:
{{- if eq .Values.configuration.cloudprovider "aws" }}
region: {{ .Values.configuration.region }}
{{- end }}
{{- if eq .Values.configuration.cloudprovider "azure" }}
apiTimeout: {{ .Values.configuration.apitimeout }}
{{- end }}
backupStorageProvider:
name: {{ .Values.configuration.cloudprovider }}
bucket: {{ .Values.configuration.bucket }}
{{- if eq .Values.configuration.cloudprovider "aws" }}
config:
region: {{ .Values.configuration.region }}
{{- end }}
backupSyncPeriod: {{ .Values.configuration.backupSyncPeriod }}
gcSyncPeriod: {{ .Values.configuration.gcSyncPeriod }}
scheduleSyncPeriod: {{ .Values.configuration.scheduleSyncPeriod }}
restoreOnlyMode: {{ .Values.configuration.restoreOnlyMode }}

11 changes: 11 additions & 0 deletions stable/ark-server/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Check that the ark-server is up and running:
kubectl get pod --namespace {{ .Values.namespace.name }}

Check that the secret has been created:
kubectl get secret --namespace {{ .Values.namespace.name }} {{ .Values.secret.name }}

Once ark server is up and running you need the client before you can use it
1. wget https://github.com/heptio/ark/releases/download/{{ .Values.image.tag }}/ark-{{ .Values.image.tag }}-darwin-amd64.tar.gz
2. tar -xvf ark-{{ .Values.image.tag }}-darwin-amd64.tar.gz -C ark-client

More info on the official site: https://github.com/heptio/ark#install-client
54 changes: 54 additions & 0 deletions stable/ark-server/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "ark-server.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 "ark-server.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 "ark-server.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create the name of the service account to use for creating or deleting the ark config
*/}}
{{- define "ark-server.hookSA" -}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rename to ark-server.hookServiceAccount

{{- if .Values.serviceAccount.hook.create -}}
{{ default "hook-sa" .Values.serviceAccount.hook.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.hook.name }}
{{- end -}}
{{- end -}}

{{/*
Create the name of the service account to use for creating or deleting the ark server
*/}}
{{- define "ark-server.sa" -}}
{{- if .Values.serviceAccount.server.create -}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rename to ark-server.serverServiceAccount

{{ default (include "ark-server.fullname" .) .Values.serviceAccount.server.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.server.name }}
{{- end -}}
{{- end -}}
16 changes: 16 additions & 0 deletions stable/ark-server/templates/backups.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: backups.ark.heptio.com
labels:
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use chart: {{ template "ark-server.chart" . }} throughout the chart.

heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
app: {{ template "ark-server.name" . }}
spec:
group: ark.heptio.com
version: v1
scope: Namespaced
names:
plural: backups
kind: Backup
7 changes: 7 additions & 0 deletions stable/ark-server/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: ark-server-config
namespace: {{ .Values.namespace.name }}
data:
{{ (tpl (.Files.Glob "configuration/*").AsConfig .) | indent 2 }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is only one file. Use Files.Get instead.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you use the alternative approach I suggested, you could just do this:

data:
  default:
{{ toYaml .Values.configuration | indent 4 }}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nice suggestion, tnx

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is a problem with this approach because I have to specify the namespace:

configuration:
  apiVersion: ark.heptio.com/v1
  kind: Config
  metadata:
    namespace: heptio-ark

And I can't do that in values.yaml
What do you think?

16 changes: 16 additions & 0 deletions stable/ark-server/templates/configs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: configs.ark.heptio.com
labels:
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
app: {{ template "ark-server.name" . }}
spec:
group: ark.heptio.com
version: v1
scope: Namespaced
names:
plural: configs
kind: Config
16 changes: 16 additions & 0 deletions stable/ark-server/templates/deletebackuprequests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: deletebackuprequests.ark.heptio.com
labels:
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
app: {{ template "ark-server.name" . }}
spec:
group: ark.heptio.com
version: v1
scope: Namespaced
names:
plural: deletebackuprequests
kind: DeleteBackupRequest
56 changes: 56 additions & 0 deletions stable/ark-server/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
apiVersion: apps/v1beta1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest you change this to apps/v1beta2 and add a spec.selector below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like the chart to follow the ark deploy without divergence

kind: Deployment
metadata:
namespace: {{ .Values.namespace.name }}
name: {{ template "ark-server.fullname" . }}
release: {{ .Release.Name }}
app: {{ template "ark-server.name" . }}
spec:
replicas: 1
template:
metadata:
labels:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add annotation here so it'll be easy to use ark with kube2iam

    {{- if .Values.podAnnotations }}
      annotations:
{{ toYaml .Values.podAnnotations | indent 8 }}
    {{- end }}

component: ark
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need a component label since there are no multiple components.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like the chart to follow the ark deploy without divergence

release: {{ .Release.Name }}
app: {{ template "ark-server.name" . }}
{{- if .Values.podAnnotations }}
annotations:
{{ toYaml .Values.podAnnotations | indent 8 }}
{{- end }}
spec:
restartPolicy: Always
serviceAccountName: {{ template "ark-server.sa" . }}
containers:
- name: ark
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add imagePullPolicy

command:
- /ark
args:
- server
{{- if eq .Values.configuration.cloudprovider "azure" }}
envFrom:
- secretRef:
name: {{ .Values.secret.name }}
{{- end }}
volumeMounts:
- name: plugins
mountPath: /plugins
{{- if (or (eq .Values.configuration.cloudprovider "aws") (eq .Values.configuration.cloudprovider "gcp")) }}
- name: cloud-credentials
mountPath: /credentials
env:
- name: {{ .Values.configuration.credentials }}
value: /credentials/cloud
{{- end }}
volumes:
{{- if (or (eq .Values.configuration.cloudprovider "aws") (eq .Values.configuration.cloudprovider "gcp")) }}
- name: cloud-credentials
secret:
secretName: {{ .Values.secret.name }}
{{- end }}
- name: plugins
emptyDir: {}
{{- if eq .Values.configuration.cloudprovider "azure" }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just make the nodeSelector configurable without any Azure-specific condition. You may also want to add tolerations.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know, but I would like the chart to follow the ark deploy and they use the nodeselector for azure only

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you since you have managed to squeeze the 3 different provider-specific deployments of Ark into one.
IMHO, you should provide a way to customize the nodeSelector while keeping azure's check (and tolerations too as @unguiculus suggests).

nodeSelector:
beta.kubernetes.io/os: linux
{{- end }}
16 changes: 16 additions & 0 deletions stable/ark-server/templates/downloadrequests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: downloadrequests.ark.heptio.com
labels:
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
app: {{ template "ark-server.name" . }}
spec:
group: ark.heptio.com
version: v1
scope: Namespaced
names:
plural: downloadrequests
kind: DownloadRequest
29 changes: 29 additions & 0 deletions stable/ark-server/templates/hook-delete.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiVersion: batch/v1
kind: Job
metadata:
name: delete-ark-config
namespace: {{ .Values.namespace.name }}
annotations:
"helm.sh/hook": pre-delete
"helm.sh/hook-delete-policy": hook-succeeded
"helm.sh/hook-weight": "2"
spec:
template:
metadata:
name: delete-ark-config
namespace: {{ .Values.namespace.name }}
spec:
restartPolicy: Never
containers:
- name: delete-ark-config
image: {{ .Values.kubectl.image.repository }}/{{ .Values.kubectl.image.tag }}
imagePullPolicy: Always
command: ["kubectl","delete","-f","/tmp/"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add spaces after commas: ["kubectl", "delete", "-f", "/tmp/"]

volumeMounts:
- name: ark-server-config
mountPath: /tmp
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd give the directory a dedicated name instead of using /tmp.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's very important, in the end the two hooks are temporary, they should deploy and die, so I though the /tmp was ok

volumes:
- name: ark-server-config
configMap:
name: ark-server-config
serviceAccountName: {{ template "ark-server.hookSA" . }}
28 changes: 28 additions & 0 deletions stable/ark-server/templates/hook-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: batch/v1
kind: Job
metadata:
name: deploy-ark-config
namespace: {{ .Values.namespace.name }}
annotations:
"helm.sh/hook": post-install
"helm.sh/hook-delete-policy": hook-succeeded
spec:
template:
metadata:
name: deploy-ark-config
namespace: {{ .Values.namespace.name }}
spec:
restartPolicy: Never
containers:
- name: deploy-ark-config
image: {{ .Values.kubectl.image.repository }}/{{ .Values.kubectl.image.tag }}
imagePullPolicy: Always
command: ["kubectl","create","-f","/tmp/"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add spaces after commas: ["kubectl", "create", "-f", "/tmp/"]

volumeMounts:
- name: ark-server-config
mountPath: /tmp
volumes:
- name: ark-server-config
configMap:
name: ark-server-config
serviceAccountName: {{ template "ark-server.hookSA" . }}
6 changes: 6 additions & 0 deletions stable/ark-server/templates/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{{- if .Values.namespace.create }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the namespace resource. This is unnecessary. Helm creates a namespace automatically if it doesn't exist. Thus, installation will fail if the release namespace is the same as {{ .Values.namespace }}. The user can specify the namespace they want using the CLI. That's all we need.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could lead to a problem with rbac.yaml because there I have to specify a namespace

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

apiVersion: v1
kind: Namespace
metadata:
name: {{ .Values.namespace.name }}
{{- end }}
Loading