Skip to content

Commit

Permalink
Merge pull request #85 from portainer/feat/ptd272/add-feature-flag
Browse files Browse the repository at this point in the history
Introduce Portainer Feature Flag
  • Loading branch information
jevontane authored Dec 16, 2021
2 parents 621b722 + b2ccdc7 commit fb6da8e
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion charts/portainer/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type: application

# 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.20
version: 1.0.21

# 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
1 change: 1 addition & 0 deletions charts/portainer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ The following table lists the configurable parameters of the Portainer chart and
| `service.edgePort` | TCP port for accessing Portainer Edge | `8000` |
| `service.edgeNodePort` | Static NodePort for accessing Portainer Edge. Specify only if the type is NodePort | `30776` |
| `service.annotations` | Annotations to add to the service | `{}` |
| `feature.flags` | Enable one or more features separated by spaces. For instance, `--feat=open-amt` | `nil` |
| `ingress.enabled` | Create an ingress for Portainer | `false` |
| `ingress.annotations` | Annotations to add to the ingress. For instane, `kubernetes.io/ingress.class: nginx` | `{}` |
| `ingress.hosts.host` | URL for Portainer Web. For instance, `portainer.example.io` | `nil` |
Expand Down
13 changes: 8 additions & 5 deletions charts/portainer/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ spec:
labels:
{{- include "portainer.selectorLabels" . | nindent 8 }}
spec:
nodeSelector: {{- toYaml .Values.nodeSelector | nindent 8 -}}
{{- with .Values.imagePullSecrets }}
nodeSelector: {{- toYaml .Values.nodeSelector | nindent 8 -}}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
serviceAccountName: {{ include "portainer.serviceAccountName" . }}
volumes:
- name: "data"
persistentVolumeClaim:
claimName: {{ template "portainer.pvcName" . }}
{{- if .Values.tls.existingSecret }}
{{- if .Values.tls.existingSecret }}
- name: certs
secret:
secretName: {{ .Values.tls.existingSecret }}
Expand All @@ -52,7 +52,10 @@ spec:
{{- end }}
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.edgeNodePort))) }}
- '--tunnel-port={{ .Values.service.edgeNodePort }}'
{{- end }}
{{- end }}
{{- if (not (empty .Values.feature.flags)) }}
- '{{ .Values.feature.flags }}'
{{- end }}
volumeMounts:
- name: data
mountPath: /data
Expand Down
4 changes: 2 additions & 2 deletions charts/portainer/templates/pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: "PersistentVolumeClaim"
apiVersion: "v1"
metadata:
name: {{ template "portainer.fullname" . }}
namespace: {{ .Release.Namespace }}
namespace: {{ .Release.Namespace }}
annotations:
{{- if .Values.persistence.storageClass }}
volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.storageClass | quote }}
Expand All @@ -16,7 +16,7 @@ metadata:
{{ end }}
labels:
io.portainer.kubernetes.application.stack: portainer
{{- include "portainer.labels" . | nindent 4 }}
{{- include "portainer.labels" . | nindent 4 }}
spec:
accessModes:
- {{ default "ReadWriteOnce" .Values.persistence.accessMode | quote }}
Expand Down
3 changes: 3 additions & 0 deletions charts/portainer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ tls:
# If set, will mount the existing secret into the pod
existingSecret: ""

feature:
flags: ""

ingress:
enabled: false
annotations: {}
Expand Down

0 comments on commit fb6da8e

Please sign in to comment.