Skip to content

Commit

Permalink
Make sure all resources contain theketch.io/app-name label (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksej-paschenko authored Dec 30, 2021
1 parent 009a4d6 commit 7b992ab
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,8 @@ kind: Certificate
metadata:
name: "dashboard-cname-theketch-io"
namespace: istio-system
labels:
theketch.io/app-name: "dashboard"
spec:
secretName: dashboard-cname-theketch-io
dnsNames:
Expand All @@ -356,6 +358,8 @@ kind: Certificate
metadata:
name: "dashboard-cname-app-theketch-io"
namespace: istio-system
labels:
theketch.io/app-name: "dashboard"
spec:
secretName: dashboard-cname-app-theketch-io
dnsNames:
Expand All @@ -369,6 +373,8 @@ apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: shipa-dashboard-rule-3
labels:
theketch.io/app-name: "dashboard"
spec:
host: dashboard-web-3
subsets:
Expand All @@ -382,6 +388,8 @@ apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: shipa-dashboard-rule-4
labels:
theketch.io/app-name: "dashboard"
spec:
host: dashboard-web-4
subsets:
Expand Down
4 changes: 4 additions & 0 deletions internal/chart/testdata/charts/dashboard-istio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,8 @@ apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: shipa-dashboard-rule-3
labels:
theketch.io/app-name: "dashboard"
spec:
host: dashboard-web-3
subsets:
Expand All @@ -354,6 +356,8 @@ apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: shipa-dashboard-rule-4
labels:
theketch.io/app-name: "dashboard"
spec:
host: dashboard-web-4
subsets:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,8 @@ apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: "dashboard-cname-theketch-io"
labels:
theketch.io/app-name: "dashboard"
spec:
secretName: "dashboard-cname-theketch-io"
dnsNames:
Expand All @@ -514,6 +516,8 @@ apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: "dashboard-cname-app-theketch-io"
labels:
theketch.io/app-name: "dashboard"
spec:
secretName: "dashboard-cname-app-theketch-io"
dnsNames:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,8 @@ apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: "dashboard-cname-theketch-io"
labels:
shipa.io/app-name: "dashboard"
spec:
secretName: "dashboard-cname-theketch-io"
dnsNames:
Expand All @@ -354,6 +356,8 @@ apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: "dashboard-cname-app-theketch-io"
labels:
shipa.io/app-name: "dashboard"
spec:
secretName: "dashboard-cname-app-theketch-io"
dnsNames:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,8 @@ apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: "dashboard-cname-theketch-io"
labels:
theketch.io/app-name: "dashboard"
spec:
secretName: "dashboard-cname-theketch-io"
dnsNames:
Expand All @@ -354,6 +356,8 @@ apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: "dashboard-cname-app-theketch-io"
labels:
theketch.io/app-name: "dashboard"
spec:
secretName: "dashboard-cname-app-theketch-io"
dnsNames:
Expand Down
2 changes: 2 additions & 0 deletions internal/templates/istio/yamls/certificate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ kind: Certificate
metadata:
name: {{ $https.secretName | quote }}
namespace: istio-system
labels:
{{ $.Values.app.group }}/app-name: {{ $.Values.app.name | quote }}
spec:
secretName: {{ $https.secretName }}
dnsNames:
Expand Down
2 changes: 2 additions & 0 deletions internal/templates/istio/yamls/destinationRule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: shipa-{{ $.Values.app.name}}-rule-{{ $deployment.version }}
labels:
{{ $.Values.app.group }}/app-name: {{ $.Values.app.name | quote }}
spec:
host: {{ printf "%s-%s-%v" $.Values.app.name $process.name $deployment.version }}
subsets:
Expand Down
2 changes: 2 additions & 0 deletions internal/templates/nginx/yamls/certificate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: {{ $https.secretName | quote }}
labels:
{{ $.Values.app.group }}/app-name: {{ $.Values.app.name | quote }}
spec:
secretName: {{ $https.secretName | quote }}
dnsNames:
Expand Down
2 changes: 2 additions & 0 deletions internal/templates/traefik/yamls/certificate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: {{ $https.secretName | quote }}
labels:
{{ $.Values.app.group }}/app-name: {{ $.Values.app.name | quote }}
spec:
secretName: {{ $https.secretName | quote }}
dnsNames:
Expand Down

0 comments on commit 7b992ab

Please sign in to comment.