Skip to content
This repository was archived by the owner on Feb 22, 2022. It is now read-only.
Merged
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
6 changes: 4 additions & 2 deletions stable/sapho/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
apiVersion: v1
description: A micro application development and integration platform that enables organizations to create and deliver secure micro applications that tie into existing business systems and track changes to key business data.
description: A micro application development and integration platform that enables
organizations to create and deliver secure micro applications that tie into existing
business systems and track changes to key business data.
name: sapho
version: 0.1.8
version: 0.2.0
home: http://www.sapho.com
icon: https://www.sapho.com/wp-content/uploads/2016/04/sapho-logotype.svg
sources:
Expand Down
8 changes: 4 additions & 4 deletions stable/sapho/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
1. Get the application URL by running these commands:
{{- if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "fullname" . }})
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "sapho.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT/login
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available, and a few more minutes before the application will be available (allow up to 5 minutes).
You can watch the status of by running 'kubectl get svc -w {{ template "fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
You can watch the status of by running 'kubectl get svc -w {{ template "sapho.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "sapho.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.externalPort }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "fullname" . }}" -o jsonpath="{.items[0].metadata.name}")
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "sapho.fullname" . }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:{{ .Values.service.externalPort }}
{{- end }}
6 changes: 3 additions & 3 deletions stable/sapho/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "name" -}}
{{- define "sapho.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- 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).
*/}}
{{- define "fullname" -}}
{{- define "sapho.fullname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
Expand All @@ -19,6 +19,6 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
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).
*/}}
{{- define "mysql.fullname" -}}
{{- define "sapho.mysql.fullname" -}}
{{- printf "%s-%s" .Release.Name "mysql" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
12 changes: 6 additions & 6 deletions stable/sapho/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: {{ template "fullname" . }}
name: {{ template "sapho.fullname" . }}
labels:
app: {{ template "fullname" . }}
app: {{ template "sapho.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
spec:
replicas: {{ .Values.replicaCount }}
template:
metadata:
labels:
app: {{ template "fullname" . }}
app: {{ template "sapho.fullname" . }}
spec:
containers:
- name: {{ template "fullname" . }}
- name: {{ template "sapho.fullname" . }}
image: "{{ .Values.image }}"
imagePullPolicy: {{ default "" .Values.imagePullPolicy | quote }}
env:
- name: SAPHO_DB_HOSTNAME
value: {{ template "mysql.fullname" . }}
value: {{ template "sapho.mysql.fullname" . }}
- name: SAPHO_DB_PORT
value: {{ .Values.saphoDBport | quote }}
- name: SAPHO_DB_TYPE
Expand All @@ -28,7 +28,7 @@ spec:
- name: SAPHO_DB_PASSWORD
valueFrom:
secretKeyRef:
name: {{ template "mysql.fullname" . }}
name: {{ template "sapho.mysql.fullname" . }}
key: mysql-root-password
ports:
- name: http
Expand Down
4 changes: 2 additions & 2 deletions stable/sapho/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "fullname" . }}
name: {{ template "sapho.fullname" . }}
labels:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
spec:
Expand All @@ -12,4 +12,4 @@ spec:
protocol: TCP
name: {{ .Values.service.name }}
selector:
app: {{ template "fullname" . }}
app: {{ template "sapho.fullname" . }}