Skip to content

Commit

Permalink
add connectivity helm chart beta version
Browse files Browse the repository at this point in the history
  • Loading branch information
guy-frontegg committed Nov 1, 2020
1 parent 9340236 commit ecf3ef5
Show file tree
Hide file tree
Showing 6 changed files with 670 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
charts/secure-access/charts
Chart.lock
charts/connectivity/charts
23 changes: 23 additions & 0 deletions charts/connectivity/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
26 changes: 26 additions & 0 deletions charts/connectivity/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: v2
name: connectivity
description: Frontegg's Connectivity Helm chart for Kubernetes
type: application
version: 0.1.0-beta1

dependencies:
- name: connectors-worker
version: "0.1.*"
repository: "https://frontegg.github.io/helm-charts/"
- name: event-service
version: "0.1.*"
repository: "https://frontegg.github.io/helm-charts/"
- name: integrations-service
version: "0.1.*"
repository: "https://frontegg.github.io/helm-charts/"
- name: notification-service
version: "0.1.*"
repository: "https://frontegg.github.io/helm-charts/"
- name: webpush-service
version: "0.3.*"
repository: "https://frontegg.github.io/helm-charts/"

maintainers:
- name: "Guy Ludvig"
email: "[email protected]"
68 changes: 68 additions & 0 deletions charts/connectivity/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "connectivity.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{- define "imagePullSecret" }}
{{- $name := required "A valid .Values.frontegg.images.username entry required!" .Values.frontegg.images.username -}}
{{- $password := required "A valid .Values.frontegg.images.password entry required!" .Values.frontegg.images.password -}}
{{- printf "{\"auths\": {\"%s\": {\"auth\": \"%s\"}}}" .Values.frontegg.images.registry (printf "%s:%s" $name $password | b64enc) | b64enc }}
{{- 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 "connectivity.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 }}

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

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

{{/*
Selector labels
*/}}
{{- define "connectivity.selectorLabels" -}}
app.kubernetes.io/name: {{ include "connectivity.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "connectivity.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "connectivity.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
9 changes: 9 additions & 0 deletions charts/connectivity/templates/docker-registry-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{- if .Values.frontegg.images.enabled }}
apiVersion: v1
kind: Secret
type: kubernetes.io/dockerconfigjson
metadata:
name: regcred
data:
.dockerconfigjson: {{ template "imagePullSecret" . }}
{{- end }}
Loading

0 comments on commit ecf3ef5

Please sign in to comment.