Skip to content

Commit

Permalink
Renamed readsb to docker-readsb-protobuf
Browse files Browse the repository at this point in the history
  • Loading branch information
theNailz committed May 15, 2023
1 parent 87dfa2e commit 48df123
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 36 deletions.
8 changes: 4 additions & 4 deletions charts/docker-readsb-protobuf/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
{{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.webservice.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "readsb.fullname" . }})
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "docker-readsb-protobuf.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.webservice.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "readsb.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "readsb.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "docker-readsb-protobuf.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "docker-readsb-protobuf.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:{{ .Values.webservice.port }}
{{- else if contains "ClusterIP" .Values.webservice.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "readsb.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "docker-readsb-protobuf.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
Expand Down
24 changes: 12 additions & 12 deletions charts/docker-readsb-protobuf/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "readsb.name" -}}
{{- define "docker-readsb-protobuf.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

Expand All @@ -10,7 +10,7 @@ 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 "readsb.fullname" -}}
{{- define "docker-readsb-protobuf.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
Expand All @@ -23,23 +23,23 @@ If release name contains chart name it will be used as a full name.
{{- end }}
{{- end }}

{{- define "readsb.fullname.web" -}}
{{- printf "%s-%s" (include "readsb.fullname" .) "web" }}
{{- define "docker-readsb-protobuf.fullname.web" -}}
{{- printf "%s-%s" (include "docker-readsb-protobuf.fullname" .) "web" }}
{{- end -}}

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

{{/*
Common labels
*/}}
{{- define "readsb.labels" -}}
helm.sh/chart: {{ include "readsb.chart" . }}
{{ include "readsb.selectorLabels" . }}
{{- define "docker-readsb-protobuf.labels" -}}
helm.sh/chart: {{ include "docker-readsb-protobuf.chart" . }}
{{ include "docker-readsb-protobuf.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
Expand All @@ -49,17 +49,17 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{/*
Selector labels
*/}}
{{- define "readsb.selectorLabels" -}}
app.kubernetes.io/name: {{ include "readsb.name" . }}
{{- define "docker-readsb-protobuf.selectorLabels" -}}
app.kubernetes.io/name: {{ include "docker-readsb-protobuf.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "readsb.serviceAccountName" -}}
{{- define "docker-readsb-protobuf.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "readsb.fullname" .) .Values.serviceAccount.name }}
{{- default (include "docker-readsb-protobuf.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
Expand Down
6 changes: 3 additions & 3 deletions charts/docker-readsb-protobuf/templates/beastservice.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "readsb.fullname" . }}-beast
name: {{ include "docker-readsb-protobuf.fullname" . }}-beast
labels:
{{- include "readsb.labels" . | nindent 4 }}
{{- include "docker-readsb-protobuf.labels" . | nindent 4 }}
spec:
type: {{ .Values.beastservice.type }}
ports:
Expand All @@ -12,4 +12,4 @@ spec:
protocol: TCP
name: beast
selector:
{{- include "readsb.selectorLabels" . | nindent 4 }}
{{- include "docker-readsb-protobuf.selectorLabels" . | nindent 4 }}
12 changes: 6 additions & 6 deletions charts/docker-readsb-protobuf/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "readsb.fullname" . }}
name: {{ include "docker-readsb-protobuf.fullname" . }}
labels:
{{- include "readsb.labels" . | nindent 4 }}
{{- include "docker-readsb-protobuf.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "readsb.selectorLabels" . | nindent 6 }}
{{- include "docker-readsb-protobuf.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "readsb.selectorLabels" . | nindent 8 }}
{{- include "docker-readsb-protobuf.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "readsb.serviceAccountName" . }}
serviceAccountName: {{ include "docker-readsb-protobuf.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
Expand Down Expand Up @@ -74,7 +74,7 @@ spec:
volumes:
- name: autogain
persistentVolumeClaim:
claimName: {{ include "readsb.fullname" . }}-autogain
claimName: {{ include "docker-readsb-protobuf.fullname" . }}-autogain
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
4 changes: 2 additions & 2 deletions charts/docker-readsb-protobuf/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "readsb.fullname.web" . -}}
{{- $fullName := include "docker-readsb-protobuf.fullname.web" . -}}
{{- $svcPort := .Values.webservice.port -}}
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
Expand All @@ -17,7 +17,7 @@ kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{- include "readsb.labels" . | nindent 4 }}
{{- include "docker-readsb-protobuf.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/docker-readsb-protobuf/templates/pvc-autogain.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "readsb.fullname" . }}-autogain
name: {{ include "docker-readsb-protobuf.fullname" . }}-autogain
spec:
accessModes:
- ReadWriteOnce
Expand Down
4 changes: 2 additions & 2 deletions charts/docker-readsb-protobuf/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "readsb.serviceAccountName" . }}
name: {{ include "docker-readsb-protobuf.serviceAccountName" . }}
labels:
{{- include "readsb.labels" . | nindent 4 }}
{{- include "docker-readsb-protobuf.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
apiVersion: v1
kind: Pod
metadata:
name: "{{ include "readsb.fullname" . }}-test-connection"
name: "{{ include "docker-readsb-protobuf.fullname" . }}-test-connection"
labels:
{{- include "readsb.labels" . | nindent 4 }}
{{- include "docker-readsb-protobuf.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test
spec:
containers:
- name: wget
image: busybox
command: ['wget']
args: ['{{ include "readsb.fullname" . }}:{{ .Values.webservice.port }}']
args: ['{{ include "docker-readsb-protobuf.fullname" . }}:{{ .Values.webservice.port }}']
restartPolicy: Never
6 changes: 3 additions & 3 deletions charts/docker-readsb-protobuf/templates/webservice.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "readsb.fullname" . }}-web
name: {{ include "docker-readsb-protobuf.fullname" . }}-web
labels:
{{- include "readsb.labels" . | nindent 4 }}
{{- include "docker-readsb-protobuf.labels" . | nindent 4 }}
spec:
type: {{ .Values.webservice.type }}
ports:
Expand All @@ -12,4 +12,4 @@ spec:
protocol: TCP
name: http
selector:
{{- include "readsb.selectorLabels" . | nindent 4 }}
{{- include "docker-readsb-protobuf.selectorLabels" . | nindent 4 }}

0 comments on commit 48df123

Please sign in to comment.