mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-18 05:40:40 +02:00
v1: Fix --state-values-set to override values of environments colocated with releases (#705)
This commit is contained in:
@@ -0,0 +1 @@
|
||||
ns: test1
|
||||
@@ -0,0 +1,5 @@
|
||||
chartifyTempDir: environment_overwrite_values
|
||||
helmfileArgs:
|
||||
- template
|
||||
- --state-values-set
|
||||
- ns=test3
|
||||
@@ -0,0 +1,17 @@
|
||||
environments:
|
||||
default:
|
||||
values:
|
||||
- base.yaml
|
||||
- override.yaml
|
||||
|
||||
repositories:
|
||||
- name: bitnami
|
||||
url: https://charts.bitnami.com/bitnami
|
||||
|
||||
releases:
|
||||
- name: test
|
||||
chart: bitnami/nginx
|
||||
namespace: {{ .Values.ns }}
|
||||
version: 13.2.27
|
||||
values:
|
||||
- values.yaml.gotmpl
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
environments:
|
||||
default:
|
||||
values:
|
||||
- base.yaml
|
||||
- override.yaml
|
||||
---
|
||||
repositories:
|
||||
- name: bitnami
|
||||
url: https://charts.bitnami.com/bitnami
|
||||
|
||||
releases:
|
||||
- name: test
|
||||
chart: bitnami/nginx
|
||||
namespace: {{ .Values.ns }}
|
||||
version: 13.2.27
|
||||
values:
|
||||
- values.yaml.gotmpl
|
||||
@@ -0,0 +1 @@
|
||||
ns: test2
|
||||
@@ -0,0 +1,2 @@
|
||||
image:
|
||||
tag: {{ .Values.ns }}
|
||||
@@ -0,0 +1,116 @@
|
||||
Warning: environments and releases cannot be defined within the same YAML part. Use --- to extract the environments into a dedicated part
|
||||
Warning: environments and releases cannot be defined within the same YAML part. Use --- to extract the environments into a dedicated part
|
||||
Adding repo bitnami https://charts.bitnami.com/bitnami
|
||||
"bitnami" has been added to your repositories
|
||||
|
||||
Templating release=test, chart=bitnami/nginx
|
||||
---
|
||||
# Source: nginx/templates/svc.yaml
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: test-nginx
|
||||
namespace: "test3"
|
||||
labels:
|
||||
app.kubernetes.io/name: nginx
|
||||
helm.sh/chart: nginx-13.2.27
|
||||
app.kubernetes.io/instance: test
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
annotations:
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
sessionAffinity: None
|
||||
externalTrafficPolicy: "Cluster"
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: http
|
||||
selector:
|
||||
app.kubernetes.io/name: nginx
|
||||
app.kubernetes.io/instance: test
|
||||
---
|
||||
# Source: nginx/templates/deployment.yaml
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: test-nginx
|
||||
namespace: "test3"
|
||||
labels:
|
||||
app.kubernetes.io/name: nginx
|
||||
helm.sh/chart: nginx-13.2.27
|
||||
app.kubernetes.io/instance: test
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
rollingUpdate: {}
|
||||
type: RollingUpdate
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: nginx
|
||||
app.kubernetes.io/instance: test
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: nginx
|
||||
helm.sh/chart: nginx-13.2.27
|
||||
app.kubernetes.io/instance: test
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
annotations:
|
||||
spec:
|
||||
|
||||
automountServiceAccountToken: false
|
||||
shareProcessNamespace: false
|
||||
serviceAccountName: default
|
||||
affinity:
|
||||
podAffinity:
|
||||
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- podAffinityTerm:
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: nginx
|
||||
app.kubernetes.io/instance: test
|
||||
topologyKey: kubernetes.io/hostname
|
||||
weight: 1
|
||||
nodeAffinity:
|
||||
|
||||
hostNetwork: false
|
||||
hostIPC: false
|
||||
initContainers:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: docker.io/bitnami/nginx:test3
|
||||
imagePullPolicy: "IfNotPresent"
|
||||
env:
|
||||
- name: BITNAMI_DEBUG
|
||||
value: "false"
|
||||
- name: NGINX_HTTP_PORT_NUMBER
|
||||
value: "8080"
|
||||
envFrom:
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8080
|
||||
livenessProbe:
|
||||
failureThreshold: 6
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 5
|
||||
tcpSocket:
|
||||
port: http
|
||||
readinessProbe:
|
||||
failureThreshold: 3
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 3
|
||||
tcpSocket:
|
||||
port: http
|
||||
resources:
|
||||
limits: {}
|
||||
requests: {}
|
||||
volumeMounts:
|
||||
volumes:
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
---
|
||||
# Source: nginx/templates/svc.yaml
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: test-nginx
|
||||
namespace: "test3"
|
||||
labels:
|
||||
app.kubernetes.io/name: nginx
|
||||
helm.sh/chart: nginx-13.2.27
|
||||
app.kubernetes.io/instance: test
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
annotations:
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
sessionAffinity: None
|
||||
externalTrafficPolicy: "Cluster"
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: http
|
||||
selector:
|
||||
app.kubernetes.io/name: nginx
|
||||
app.kubernetes.io/instance: test
|
||||
---
|
||||
# Source: nginx/templates/deployment.yaml
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: test-nginx
|
||||
namespace: "test3"
|
||||
labels:
|
||||
app.kubernetes.io/name: nginx
|
||||
helm.sh/chart: nginx-13.2.27
|
||||
app.kubernetes.io/instance: test
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
rollingUpdate: {}
|
||||
type: RollingUpdate
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: nginx
|
||||
app.kubernetes.io/instance: test
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: nginx
|
||||
helm.sh/chart: nginx-13.2.27
|
||||
app.kubernetes.io/instance: test
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
annotations:
|
||||
spec:
|
||||
|
||||
automountServiceAccountToken: false
|
||||
shareProcessNamespace: false
|
||||
serviceAccountName: default
|
||||
affinity:
|
||||
podAffinity:
|
||||
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- podAffinityTerm:
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: nginx
|
||||
app.kubernetes.io/instance: test
|
||||
topologyKey: kubernetes.io/hostname
|
||||
weight: 1
|
||||
nodeAffinity:
|
||||
|
||||
hostNetwork: false
|
||||
hostIPC: false
|
||||
initContainers:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: docker.io/bitnami/nginx:test3
|
||||
imagePullPolicy: "IfNotPresent"
|
||||
env:
|
||||
- name: BITNAMI_DEBUG
|
||||
value: "false"
|
||||
- name: NGINX_HTTP_PORT_NUMBER
|
||||
value: "8080"
|
||||
envFrom:
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8080
|
||||
livenessProbe:
|
||||
failureThreshold: 6
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 5
|
||||
tcpSocket:
|
||||
port: http
|
||||
readinessProbe:
|
||||
failureThreshold: 3
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 3
|
||||
tcpSocket:
|
||||
port: http
|
||||
resources:
|
||||
limits: {}
|
||||
requests: {}
|
||||
volumeMounts:
|
||||
volumes:
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
https://github.com/helmfile/helmfile/issues/700
|
||||
Reference in New Issue
Block a user