Skip to content

Commit

Permalink
Generate calico manifests from helm
Browse files Browse the repository at this point in the history
  • Loading branch information
jayanthvn committed Jul 22, 2021
1 parent d4e8b9a commit 5430979
Show file tree
Hide file tree
Showing 43 changed files with 5,032 additions and 1,127 deletions.
214 changes: 0 additions & 214 deletions charts/aws-calico/crds/crds.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions charts/aws-calico/crds/kustomization.yaml

This file was deleted.

58 changes: 5 additions & 53 deletions charts/aws-calico/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,55 +1,7 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "aws-calico.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{/* generate the image name for a component*/}}
{{- define "tigera-operator.image" -}}
{{- if .registry -}}
{{- .registry | trimSuffix "/" -}}/
{{- end -}}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "aws-calico.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- .image -}}:{{- .version -}}
{{- end -}}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "aws-calico.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}

{{/*
Common labels
*/}}
{{- define "aws-calico.labels" -}}
helm.sh/chart: {{ include "aws-calico.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}

{{/*
Create the name of the service account to use
*/}}
{{- define "aws-calico.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "aws-calico.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}
22 changes: 0 additions & 22 deletions charts/aws-calico/templates/config-map.yaml

This file was deleted.

Loading

0 comments on commit 5430979

Please sign in to comment.