Skip to content

Commit

Permalink
feat(crossplane-aws-factory): cleanup Kubernetes labels
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
  • Loading branch information
nlamirault committed Apr 16, 2024
1 parent 508b96f commit 01e2125
Show file tree
Hide file tree
Showing 15 changed files with 31 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/crossplane-aws-factory/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ annotations:
url: https://keybase.io/nlamirault/pgp_keys.asc
artifacthub.io/changes: |
- kind: changed
description: Additional labels and annotations
description: Cleanup labels
1 change: 0 additions & 1 deletion charts/crossplane-aws-factory/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ helm.sh/chart: {{ include "crossplane-aws-factory.chart" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/component: crossplane-factory
app.kubernetes.io/part-of: {{ include "crossplane-aws-factory.name" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
crossplane.io/version: {{ .Values.crossplane.version }}
Expand Down
1 change: 1 addition & 0 deletions charts/crossplane-aws-factory/templates/aws-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ metadata:
namespace: {{ template "crossplane-aws-factory.namespace" . }}
labels:
{{- include "crossplane-aws-factory.labels" . | nindent 4 }}
app.kubernetes.io/component: config
{{- with .Values.additionalAnnotations }}
annotations:
{{ toYaml . | indent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ metadata:
namespace: {{ template "crossplane-aws-factory.namespace" . }}
labels:
{{- include "crossplane-aws-factory.labels" . | nindent 4 }}
app.kubernetes.io/component: config
{{- with .Values.additionalAnnotations }}
annotations:
{{ toYaml . | indent 4 }}
Expand Down
1 change: 1 addition & 0 deletions charts/crossplane-aws-factory/templates/aws-provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ metadata:
namespace: {{ template "crossplane-aws-factory.namespace" . }}
labels:
{{- include "crossplane-aws-factory.labels" . | nindent 4 }}
app.kubernetes.io/component: provider
{{- with .Values.additionalAnnotations }}
annotations:
{{ toYaml . | indent 4 }}
Expand Down
6 changes: 6 additions & 0 deletions charts/crossplane-aws-factory/templates/ecr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ metadata:
namespace: {{ $namespace }}
labels:
{{- include "crossplane-aws-factory.labels" $ | nindent 4 }}
app.kubernetes.io/component: ecr
{{- with $.Values.additionalAnnotations }}
annotations:
{{ toYaml . | indent 4 }}
Expand All @@ -49,6 +50,8 @@ kind: RepositoryPolicy
metadata:
name: {{ $repoName }}
labels:
{{- include "crossplane-aws-factory.labels" $ | nindent 4 }}
app.kubernetes.io/component: ecr
region: {{ $region }}
spec:
forProvider:
Expand All @@ -71,6 +74,9 @@ spec:
apiVersion: ecr.aws.crossplane.io/v1alpha1
kind: LifecyclePolicy
metadata:
labels:
{{- include "crossplane-aws-factory.labels" $ | nindent 4 }}
app.kubernetes.io/component: ecr
name: {{ $repoName }}
spec:
forProvider:
Expand Down
3 changes: 3 additions & 0 deletions charts/crossplane-aws-factory/templates/eks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ metadata:
namespace: {{ template "crossplane-aws-factory.namespace" . }}
labels:
{{- include "crossplane-aws-factory.labels" . | nindent 4 }}
app.kubernetes.io/component: eks
{{- with .Values.additionalAnnotations }}
annotations:
{{ toYaml . | indent 4 }}
Expand Down Expand Up @@ -67,6 +68,7 @@ metadata:
namespace: {{ template "crossplane-aws-factory.namespace" . }}
labels:
{{- include "crossplane-aws-factory.labels" . | nindent 4 }}
app.kubernetes.io/component: eks
{{- with .Values.additionalAnnotations }}
annotations:
{{ toYaml . | indent 4 }}
Expand Down Expand Up @@ -110,6 +112,7 @@ metadata:
namespace: {{ template "crossplane-aws-factory.namespace" . }}
labels:
{{- include "crossplane-aws-factory.labels" . | nindent 4 }}
app.kubernetes.io/component: eks
{{- with .Values.additionalAnnotations }}
annotations:
{{ toYaml . | indent 4 }}
Expand Down
7 changes: 7 additions & 0 deletions charts/crossplane-aws-factory/templates/iam-eks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ metadata:
namespace: {{ template "crossplane-aws-factory.namespace" . }}
labels:
{{- include "crossplane-aws-factory.labels" . | nindent 4 }}
app.kubernetes.io/component: iam
{{- with .Values.additionalAnnotations }}
annotations:
{{ toYaml . | indent 4 }}
Expand Down Expand Up @@ -69,6 +70,7 @@ metadata:
namespace: {{ template "crossplane-aws-factory.namespace" . }}
labels:
{{- include "crossplane-aws-factory.labels" . | nindent 4 }}
app.kubernetes.io/component: iam
{{- with .Values.additionalAnnotations }}
annotations:
{{ toYaml . | indent 4 }}
Expand Down Expand Up @@ -113,6 +115,7 @@ metadata:
namespace: {{ template "crossplane-aws-factory.namespace" . }}
labels:
{{- include "crossplane-aws-factory.labels" . | nindent 4 }}
app.kubernetes.io/component: iam
{{- with .Values.additionalAnnotations }}
annotations:
{{ toYaml . | indent 4 }}
Expand All @@ -135,6 +138,7 @@ metadata:
namespace: {{ template "crossplane-aws-factory.namespace" . }}
labels:
{{- include "crossplane-aws-factory.labels" . | nindent 4 }}
app.kubernetes.io/component: iam
{{- with .Values.additionalAnnotations }}
annotations:
{{ toYaml . | indent 4 }}
Expand All @@ -157,6 +161,7 @@ metadata:
namespace: {{ template "crossplane-aws-factory.namespace" . }}
labels:
{{- include "crossplane-aws-factory.labels" . | nindent 4 }}
app.kubernetes.io/component: iam
{{- with .Values.additionalAnnotations }}
annotations:
{{ toYaml . | indent 4 }}
Expand All @@ -179,6 +184,7 @@ metadata:
namespace: {{ template "crossplane-aws-factory.namespace" . }}
labels:
{{- include "crossplane-aws-factory.labels" . | nindent 4 }}
app.kubernetes.io/component: iam
{{- with .Values.additionalAnnotations }}
annotations:
{{ toYaml . | indent 4 }}
Expand All @@ -201,6 +207,7 @@ metadata:
namespace: {{ template "crossplane-aws-factory.namespace" . }}
labels:
{{- include "crossplane-aws-factory.labels" . | nindent 4 }}
app.kubernetes.io/component: iam
{{- with .Values.additionalAnnotations }}
annotations:
{{ toYaml . | indent 4 }}
Expand Down
2 changes: 2 additions & 0 deletions charts/crossplane-aws-factory/templates/internet-gateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ metadata:
namespace: {{ template "crossplane-aws-factory.namespace" . }}
labels:
{{- include "crossplane-aws-factory.labels" . | nindent 4 }}
app.kubernetes.io/component: ec2
{{- with .Values.additionalAnnotations }}
annotations:
{{ toYaml . | indent 4 }}
Expand Down Expand Up @@ -52,6 +53,7 @@ metadata:
namespace: {{ template "crossplane-aws-factory.namespace" . }}
labels:
{{- include "crossplane-aws-factory.labels" . | nindent 4 }}
app.kubernetes.io/component: ec2
{{- with .Values.additionalAnnotations }}
annotations:
{{ toYaml . | indent 4 }}
Expand Down
2 changes: 2 additions & 0 deletions charts/crossplane-aws-factory/templates/nat-gateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ metadata:
namespace: {{ template "crossplane-aws-factory.namespace" . }}
labels:
{{- include "crossplane-aws-factory.labels" . | nindent 4 }}
app.kubernetes.io/component: ec2
{{- with .Values.additionalAnnotations }}
annotations:
{{ toYaml . | indent 4 }}
Expand Down Expand Up @@ -51,6 +52,7 @@ metadata:
namespace: {{ template "crossplane-aws-factory.namespace" . }}
labels:
{{- include "crossplane-aws-factory.labels" . | nindent 4 }}
app.kubernetes.io/component: ec2
{{- with .Values.additionalAnnotations }}
annotations:
{{ toYaml . | indent 4 }}
Expand Down
2 changes: 2 additions & 0 deletions charts/crossplane-aws-factory/templates/sg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ metadata:
namespace: {{ template "crossplane-aws-factory.namespace" . }}
labels:
{{- include "crossplane-aws-factory.labels" . | nindent 4 }}
app.kubernetes.io/component: ec2
{{- with .Values.additionalAnnotations }}
annotations:
{{ toYaml . | indent 4 }}
Expand Down Expand Up @@ -56,6 +57,7 @@ metadata:
namespace: {{ template "crossplane-aws-factory.namespace" . }}
labels:
{{- include "crossplane-aws-factory.labels" . | nindent 4 }}
app.kubernetes.io/component: ec2
{{- with .Values.additionalAnnotations }}
annotations:
{{ toYaml . | indent 4 }}
Expand Down
2 changes: 2 additions & 0 deletions charts/crossplane-aws-factory/templates/sns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ metadata:
namespace: {{ $namespace }}
labels:
{{- include "crossplane-aws-factory.labels" $ | nindent 4 }}
app.kubernetes.io/component: sns
{{- with $.Values.additionalAnnotations }}
annotations:
{{ toYaml . | indent 4 }}
Expand Down Expand Up @@ -56,6 +57,7 @@ metadata:
namespace: {{ $namespace }}
labels:
{{- include "crossplane-aws-factory.labels" $ | nindent 4 }}
app.kubernetes.io/component: sns
{{- with $.Values.additionalAnnotations }}
annotations:
{{ toYaml . | indent 4 }}
Expand Down
1 change: 1 addition & 0 deletions charts/crossplane-aws-factory/templates/sqs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ metadata:
namespace: {{ $namespace }}
labels:
{{- include "crossplane-aws-factory.labels" $ | nindent 4 }}
app.kubernetes.io/component: sqs
{{- with $.Values.additionalAnnotations }}
annotations:
{{ toYaml . | indent 4 }}
Expand Down
1 change: 1 addition & 0 deletions charts/crossplane-aws-factory/templates/subnets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ metadata:
namespace: {{ $namespace }}
labels:
{{- include "crossplane-aws-factory.labels" $ | nindent 4 }}
app.kubernetes.io/component: ec2
{{- with $.Values.additionalAnnotations }}
annotations:
{{ toYaml . | indent 4 }}
Expand Down
1 change: 1 addition & 0 deletions charts/crossplane-aws-factory/templates/vpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ metadata:
namespace: {{ template "crossplane-aws-factory.namespace" . }}
labels:
{{- include "crossplane-aws-factory.labels" . | nindent 4 }}
app.kubernetes.io/component: ec2
{{- with .Values.additionalAnnotations }}
annotations:
{{ toYaml . | indent 4 }}
Expand Down

0 comments on commit 01e2125

Please sign in to comment.