Skip to content

Commit

Permalink
Add extra optional service definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
tsigouris007 committed Feb 27, 2024
1 parent 83f06b4 commit 60ea6ea
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
5 changes: 4 additions & 1 deletion charts/falcon-crowdstrike/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
{{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
{{- end }}
{{- if .Values.service.create }}
{{- if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "falcon-crowdstrike.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
Expand All @@ -20,3 +22,4 @@
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
{{- end }}
{{- end }}
4 changes: 3 additions & 1 deletion charts/falcon-crowdstrike/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{{- if .Values.service.create -}}
apiVersion: v1
kind: Service
metadata:
name: {{ include "falcon-crowdstrike.fullname" . }}
name: {{ include "falcon-crowdstrike.fullname" . | default "ClusterIP" }}
labels:
{{- include "falcon-crowdstrike.labels" . | nindent 4 }}
spec:
Expand All @@ -13,3 +14,4 @@ spec:
name: http
selector:
{{- include "falcon-crowdstrike.selectorLabels" . | nindent 4 }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/falcon-crowdstrike/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ serviceAccount:
# If not set and create is true, a name is generated using the fullname template
name: "falcon-crowdstrike-sa"

service:
create: false
type: ClusterIP

podAnnotations: {}
podLabels: {}

Expand Down

0 comments on commit 60ea6ea

Please sign in to comment.