Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: reference-chart_5-1-0
version: 5.1.0
name: reference-chart_5-1-1
version: 5.1.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# Rollout Deployment Chart - v5.0
# Rollout Deployment Chart - v5.1

## 1. Yaml File -

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -750,10 +750,12 @@ spec:
- {{ . }}
{{- end }}
{{- end }}
{{- else if .Values.deployment.strategy.canary.trafficRouting.customTrafficRouting }}
{{ toYaml .Values.deployment.strategy.canary.trafficRouting.customTrafficRouting | indent 8 }}
{{- end }}
{{- if .Values.deployment.strategy.canary.trafficRouting.managedRoutes }}
managedRoutes:
{{ toYaml .Values.deployment.strategy.canary.trafficRouting.managedRoutes | indent 10 }}
{{ toYaml .Values.deployment.strategy.canary.trafficRouting.managedRoutes | indent 10 }}
{{- end }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
{{if (or (eq .externalType "ESO_GoogleSecretsManager") (eq .externalType "ESO_AWSSecretsManager") (eq .externalType "ESO_HashiCorpVault") (eq .externalType "ESO_AzureSecretsManager"))}}
{{- if .esoSecretData.secretStore }}
---
{{- if $.Capabilities.APIVersions.Has "external-secrets.io/v1" }}
apiVersion: external-secrets.io/v1
{{- else }}
apiVersion: external-secrets.io/v1beta1
{{- end }}
kind: SecretStore
metadata:
name: {{ .name}}
Expand All @@ -22,7 +26,11 @@ spec:
{{- toYaml .esoSecretData.secretStore | nindent 4 }}
{{- end }}
---
apiVersion: external-secrets.io/v1beta1
{{- if $.Capabilities.APIVersions.Has "external-secrets.io/v1" }}
apiVersion: external-secrets.io/v1
{{- else }}
apiVersion: external-secrets.io/v1beta1
{{- end }}
kind: ExternalSecret
metadata:
name: {{ .name }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ metadata:
{{- else }}
name: {{ template ".Chart.Name .fullname" $ }}-destinationrule
{{- end }}
{{- if .destinationRule.namespace }}
namespace: {{ .destinationRule.namespace }}
{{- end }}
labels:
app: {{ template ".Chart.Name .name" $ }}
appId: {{ $.Values.app | quote }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ metadata:
{{- else }}
name: {{ template ".Chart.Name .fullname" $ }}-virtualservice
{{- end }}
{{- if .virtualService.namespace }}
namespace: {{ .virtualService.namespace }}
{{- end }}
labels:
app: {{ template ".Chart.Name .name" $ }}
appId: {{ $.Values.app | quote }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,12 @@ deployment:
- pause: {} # final manual approval (optional)

trafficRouting:
# managedRoutes:
# - name: api-canary
managedRoutes:
- name: api-canary
devtron: test
customTrafficRouting:
nginx:
stableIngress: rollouts-demo-stable
istio:
virtualService:
name: api-vs
Expand Down
15 changes: 15 additions & 0 deletions scripts/sql/34604602_reference-5-1-1.down.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
DELETE FROM global_strategy_metadata_chart_ref_mapping
WHERE chart_ref_id IN (
SELECT id
FROM "public"."chart_ref"
WHERE "version" = '5.1.0'
AND "location" = 'reference-chart_5-1-0'
AND "name" = 'Rollout Deployment'
)
AND global_strategy_metadata_id IN (1, 2, 3, 4);

-- 2. Remove the chart reference (Parent)
DELETE FROM "public"."chart_ref"
WHERE "version" = '5.1.0'
AND "location" = 'reference-chart_5-1-0'
AND "name" = 'Rollout Deployment';
39 changes: 39 additions & 0 deletions scripts/sql/34604602_reference-5-1-1.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
-- 1. Insert chart_ref if not exists
INSERT INTO "public"."chart_ref" (
"location", "version", "deployment_strategy_path",
"is_default", "active", "created_on", "created_by",
"updated_on", "updated_by", "name"
)
SELECT
'reference-chart_5-1-1', '5.1.1', 'pipeline-values.yaml',

Check failure on line 8 in scripts/sql/34604602_reference-5-1-1.up.sql

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal 3 times.

See more on https://sonarcloud.io/project/issues?id=devtron-labs_devtron&issues=AZrEfIbVCYpU4GBVjIi2&open=AZrEfIbVCYpU4GBVjIi2&pullRequest=6875
'f', 't', now(), 1, now(), 1,
'Rollout Deployment'

Check failure on line 10 in scripts/sql/34604602_reference-5-1-1.up.sql

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal 3 times.

See more on https://sonarcloud.io/project/issues?id=devtron-labs_devtron&issues=AZrExH3tG7lXAc-KjcsC&open=AZrExH3tG7lXAc-KjcsC&pullRequest=6875
WHERE NOT EXISTS (
SELECT 1
FROM "public"."chart_ref"
WHERE "version" = '5.1.1'
AND "location" = 'reference-chart_5-1-1'
AND "name" = 'Rollout Deployment'
);

-- 2. Insert mappings based on the chart_ref above
INSERT INTO global_strategy_metadata_chart_ref_mapping (
"global_strategy_metadata_id", "chart_ref_id", "active",
"created_on", "created_by", "updated_on", "updated_by", "default"
)
SELECT
m_ids.id,
cr.id,
true, now(), 1, now(), 1,
(m_ids.id = 1)
FROM
"public"."chart_ref" cr,
(VALUES (1), (2), (3), (4)) AS m_ids(id)
WHERE
cr.version = '5.1.1' AND cr.name = 'Rollout Deployment'
AND NOT EXISTS (
SELECT 1
FROM global_strategy_metadata_chart_ref_mapping existing
WHERE existing.global_strategy_metadata_id = m_ids.id
AND existing.chart_ref_id = cr.id
);