diff --git a/charts/go-monorepo/Chart.yaml b/charts/go-monorepo/Chart.yaml index 010801c..abddef2 100644 --- a/charts/go-monorepo/Chart.yaml +++ b/charts/go-monorepo/Chart.yaml @@ -1,3 +1,3 @@ apiVersion: v2 name: go-monorepo -version: 0.0.12 \ No newline at end of file +version: 0.0.13 \ No newline at end of file diff --git a/charts/go-monorepo/templates/gateway/httproute.yaml b/charts/go-monorepo/templates/gateway/httproute.yaml new file mode 100644 index 0000000..e5122b0 --- /dev/null +++ b/charts/go-monorepo/templates/gateway/httproute.yaml @@ -0,0 +1,24 @@ +{{ if .Values.ingress.enabled }} +{{ if eq .Values.ingress.type "kong" }} +kind: HTTPRoute +apiVersion: gateway.networking.k8s.io/v1beta1 +metadata: + name: {{ .Release.Name }} +spec: + parentRefs: + - group: gateway.networking.k8s.io + kind: Gateway + name: kong + namespace: kong-gateway-operator + rules: + - matches: + - path: + type: PathPrefix + value: / + backendRefs: + - name: {{ .Release.Name }} + port: {{ .Values.port }} + hostnames: + - "{{ .Values.name }}.{{ .Values.environment }}.windkube.com" +{{ end }} +{{ end }} \ No newline at end of file diff --git a/charts/go-monorepo/templates/lib/containers.tpl b/charts/go-monorepo/templates/lib/containers.tpl index 721521c..5518fac 100644 --- a/charts/go-monorepo/templates/lib/containers.tpl +++ b/charts/go-monorepo/templates/lib/containers.tpl @@ -17,4 +17,9 @@ {{ if .Values.env }} env: {{ .Values.env | toYaml | nindent 2 }} {{ end }} + {{ if .Values.port }} + ports: + - containerPort: {{ .Values.port }} + name: http + {{ end }} {{ end }} \ No newline at end of file diff --git a/charts/go-monorepo/templates/rabbitmq/secret.yaml b/charts/go-monorepo/templates/rabbitmq/secret.yaml index 4960821..9d8595d 100644 --- a/charts/go-monorepo/templates/rabbitmq/secret.yaml +++ b/charts/go-monorepo/templates/rabbitmq/secret.yaml @@ -7,7 +7,6 @@ metadata: name: {{ .Release.Name }} data: username: {{ .Values.rabbitmq.user.username | b64enc }} - password: {{ .Values.rabbitmq.user.password | b64enc }} {{ end }} {{ end }} {{ end }} \ No newline at end of file diff --git a/charts/go-monorepo/templates/service.yaml b/charts/go-monorepo/templates/service.yaml new file mode 100644 index 0000000..507d9e2 --- /dev/null +++ b/charts/go-monorepo/templates/service.yaml @@ -0,0 +1,14 @@ +{{ if .Values.port }} +apiVersion: v1 +kind: Service +metadata: + name: {{ .Release.Name }} +spec: + ports: + - port: {{ .Values.port }} + targetPort: {{ .Values.port }} + protocol: TCP + name: http + selector: + app: {{ .Release.Name }} +{{ end }} \ No newline at end of file diff --git a/charts/go-monorepo/values.yaml b/charts/go-monorepo/values.yaml index 2b5b3aa..a66fac7 100644 --- a/charts/go-monorepo/values.yaml +++ b/charts/go-monorepo/values.yaml @@ -22,6 +22,12 @@ args: [] secrets: enabled: true +# port: 8088 + +ingress: + enabled: false + type: kong + # Those maps to configMap envs: {} # KEY: VALUE