-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Ingress & Service #40
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{{- if .Values.ingress.enabled }} | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: {{ include "fahclient.fullname" . }}-ingress | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
app: {{ include "fahclient.fullname" . }} | ||
{{- if .Values.ingress.annotations }} | ||
annotations: | ||
{{- .Values.ingress.annotations | toYaml | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
rules: | ||
- host: {{ .Values.ingress.hostname }} | ||
http: | ||
paths: | ||
- backend: | ||
service: | ||
name: {{ include "fahclient.fullname" . }}-service | ||
port: | ||
number: {{ .Values.service.port }} | ||
pathType: ImplementationSpecific | ||
path: {{ .Values.ingress.path | default "/" }} | ||
{{- if .Values.ingress.tls }} | ||
tls: | ||
- hosts: | ||
- {{ .Values.ingress.hostname }} | ||
secretName: {{ printf "%s-tls" .Values.ingress.hostname }} | ||
{{- end }} | ||
{{- end }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: v1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This whole file should be behind a feature flag, just like the ingress. In my deployment, I don't need a service, so wouldn't want one created. |
||
kind: Service | ||
metadata: | ||
name: {{ include "fahclient.fullname" . }}-service | ||
labels: | ||
app: {{ include "fahclient.fullname" . }} | ||
spec: | ||
type: {{ .Values.service.type | default "ClusterIP" }} | ||
selector: | ||
app: {{ include "fahclient.fullname" . }} | ||
ports: | ||
- name: "http" | ||
protocol: TCP | ||
targetPort: 7396 | ||
port: {{ .Values.service.port | default "80" }} |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -37,6 +37,10 @@ fahClient: | |||||
<power value="full"/> | ||||||
|
||||||
<web-enable v='false'/> | ||||||
<!-- Uncomment when using ingress: --> | ||||||
<!-- <allow v='127.0.0.1 10.0.0.0/8 192.168.0.0/16' /> | ||||||
<web-allow v='127.0.0.1 10.0.0.0/8 192.168.0.0/16' /> --> | ||||||
|
||||||
<disable-viz v='true'/> | ||||||
<gui-enabled v='false'/> | ||||||
<!-- 1 slots for GPUs --> | ||||||
|
@@ -70,10 +74,27 @@ securityContext: | |||||
- ALL | ||||||
readOnlyRootFilesystem: false | ||||||
|
||||||
# Don't forget to enable external access in configmap, to access service | ||||||
service: | ||||||
type: ClusterIP | ||||||
port: 80 | ||||||
|
||||||
# Ingress for WebUI | ||||||
# Don't forget to enable external access in configmap, too | ||||||
ingress: | ||||||
enabled: false | ||||||
hostname: chart-example.local | ||||||
path: / | ||||||
|
||||||
# Enable TLS for Ingress e.g. letsencrypt using cert-manager | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You should probably mention here that the secret name has an expected value, or add a new variable to specify it, for those not using cert-manager. |
||||||
tls: false | ||||||
|
||||||
# Ingress Annotations | ||||||
annotations: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
IIRC, the chart will fail to deploy because the value isn't provided here for annotations. |
||||||
#cert-manager.io/cluster-issuer: cluster-issuer | ||||||
#kubernetes.io/ingress.class: nginx | ||||||
#ingress.kubernetes.io/ssl-redirect: 'true' | ||||||
|
||||||
storageClassName: "" | ||||||
|
||||||
# set to some sane defaults to prevent interference | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And the corresponding changes elsewhere.