Improve tornjak service API to have object structure (#392)
This commit is contained in:
@@ -410,8 +410,7 @@ Now you can interact with the Spire agent socket from your own application. The
|
|||||||
| spire-server.tornjak.image.version | string | `""` | This value is deprecated in favor of tag. (Will be removed in a future release) |
|
| spire-server.tornjak.image.version | string | `""` | This value is deprecated in favor of tag. (Will be removed in a future release) |
|
||||||
| spire-server.tornjak.resources | object | `{}` | |
|
| spire-server.tornjak.resources | object | `{}` | |
|
||||||
| spire-server.tornjak.service.annotations | object | `{}` | |
|
| spire-server.tornjak.service.annotations | object | `{}` | |
|
||||||
| spire-server.tornjak.service.portHttp | int | `10080` | |
|
| spire-server.tornjak.service.ports | object | `{"http":10080,"https":10443}` | Ports for tornjak |
|
||||||
| spire-server.tornjak.service.portHttps | int | `10443` | |
|
|
||||||
| spire-server.tornjak.service.type | string | `"ClusterIP"` | |
|
| spire-server.tornjak.service.type | string | `"ClusterIP"` | |
|
||||||
| spire-server.tornjak.startupProbe.failureThreshold | int | `3` | |
|
| spire-server.tornjak.startupProbe.failureThreshold | int | `3` | |
|
||||||
| spire-server.tornjak.startupProbe.initialDelaySeconds | int | `5` | Initial delay seconds for |
|
| spire-server.tornjak.startupProbe.initialDelaySeconds | int | `5` | Initial delay seconds for |
|
||||||
|
|||||||
@@ -210,8 +210,7 @@ In order to run Tornjak with simple HTTP Connection only, make sure you don't cr
|
|||||||
| tornjak.image.version | string | `""` | This value is deprecated in favor of tag. (Will be removed in a future release) |
|
| tornjak.image.version | string | `""` | This value is deprecated in favor of tag. (Will be removed in a future release) |
|
||||||
| tornjak.resources | object | `{}` | |
|
| tornjak.resources | object | `{}` | |
|
||||||
| tornjak.service.annotations | object | `{}` | |
|
| tornjak.service.annotations | object | `{}` | |
|
||||||
| tornjak.service.portHttp | int | `10080` | |
|
| tornjak.service.ports | object | `{"http":10080,"https":10443}` | Ports for tornjak |
|
||||||
| tornjak.service.portHttps | int | `10443` | |
|
|
||||||
| tornjak.service.type | string | `"ClusterIP"` | |
|
| tornjak.service.type | string | `"ClusterIP"` | |
|
||||||
| tornjak.startupProbe.failureThreshold | int | `3` | |
|
| tornjak.startupProbe.failureThreshold | int | `3` | |
|
||||||
| tornjak.startupProbe.initialDelaySeconds | int | `5` | Initial delay seconds for |
|
| tornjak.startupProbe.initialDelaySeconds | int | `5` | Initial delay seconds for |
|
||||||
|
|||||||
@@ -15,21 +15,21 @@ Tornjak runs without authentication and is therefore NOT suitable to run in prod
|
|||||||
Only use in test environments!
|
Only use in test environments!
|
||||||
|
|
||||||
Access Tornjak:
|
Access Tornjak:
|
||||||
kubectl -n {{ include "spire-server.namespace" . }} port-forward service/{{ include "spire-tornjak.servicename" . }} {{ .Values.tornjak.service.portHttp }}:10080
|
kubectl -n {{ include "spire-server.namespace" . }} port-forward service/{{ include "spire-tornjak.servicename" . }} {{ .Values.tornjak.service.ports.http }}:10080
|
||||||
{{- if eq (include "spire-tornjak.connectionType" .) "http" }}
|
{{- if eq (include "spire-tornjak.connectionType" .) "http" }}
|
||||||
Open browser to: http://localhost:{{ .Values.tornjak.service.portHttp }}
|
Open browser to: http://localhost:{{ .Values.tornjak.service.ports.http }}
|
||||||
{{- else if eq (include "spire-tornjak.connectionType" .) "tls" }}
|
{{- else if eq (include "spire-tornjak.connectionType" .) "tls" }}
|
||||||
Open browser to: https://localhost:{{ .Values.tornjak.service.portHttps }}
|
Open browser to: https://localhost:{{ .Values.tornjak.service.ports.https }}
|
||||||
|
|
||||||
*** NOTE: You might get a security warning if using self-signed certificate
|
*** NOTE: You might get a security warning if using self-signed certificate
|
||||||
or use curl:
|
or use curl:
|
||||||
|
|
||||||
curl --cacert certs/ca.crt https://localhost:{{ .Values.tornjak.service.portHttps }}
|
curl --cacert certs/ca.crt https://localhost:{{ .Values.tornjak.service.ports.https }}
|
||||||
{{- if eq (include "spire-tornjak.connectionType" .) "mtls" }}
|
{{- if eq (include "spire-tornjak.connectionType" .) "mtls" }}
|
||||||
|
|
||||||
Or provide a client certificate and key to use mTLS authentication:
|
Or provide a client certificate and key to use mTLS authentication:
|
||||||
|
|
||||||
curl --cacert certs/ca.crt --key client.key --cert client.crt https://localhost:{{ .Values.tornjak.service.portHttps }}
|
curl --cacert certs/ca.crt --key client.key --cert client.crt https://localhost:{{ .Values.tornjak.service.ports.https }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
ERROR! Incorrect value selected for "Values.tornjak.config.connectionType"
|
ERROR! Incorrect value selected for "Values.tornjak.config.connectionType"
|
||||||
|
|||||||
@@ -16,13 +16,13 @@ spec:
|
|||||||
- name: curl-tornjak-backend
|
- name: curl-tornjak-backend
|
||||||
image: {{ template "spire-lib.image" (dict "image" .Values.tests.bash.image "global" .Values.global) }}
|
image: {{ template "spire-lib.image" (dict "image" .Values.tests.bash.image "global" .Values.global) }}
|
||||||
command: ['curl']
|
command: ['curl']
|
||||||
args: ['-k', '-s', '-f', 'http://{{ include "spire-tornjak.servicename" . }}.{{ include "spire-server.namespace" . }}.svc.{{ include "spire-lib.cluster-domain" . }}:{{ .Values.tornjak.service.portHttp }}/api/tornjak/serverinfo']
|
args: ['-k', '-s', '-f', 'http://{{ include "spire-tornjak.servicename" . }}.{{ include "spire-server.namespace" . }}.svc.{{ include "spire-lib.cluster-domain" . }}:{{ .Values.tornjak.service.ports.http }}/api/tornjak/serverinfo']
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- toYaml .Values.securityContext | nindent 8 }}
|
{{- toYaml .Values.securityContext | nindent 8 }}
|
||||||
- name: curl-tornjak-backend-and-spire
|
- name: curl-tornjak-backend-and-spire
|
||||||
image: {{ template "spire-lib.image" (dict "image" .Values.tests.bash.image "global" .Values.global) }}
|
image: {{ template "spire-lib.image" (dict "image" .Values.tests.bash.image "global" .Values.global) }}
|
||||||
command: ['curl']
|
command: ['curl']
|
||||||
args: ['-k', '-s', '-f', 'http://{{ include "spire-tornjak.servicename" . }}.{{ include "spire-server.namespace" . }}.svc.{{ include "spire-lib.cluster-domain" . }}:{{ .Values.tornjak.service.portHttp }}/api/healthcheck']
|
args: ['-k', '-s', '-f', 'http://{{ include "spire-tornjak.servicename" . }}.{{ include "spire-server.namespace" . }}.svc.{{ include "spire-lib.cluster-domain" . }}:{{ .Values.tornjak.service.ports.http }}/api/healthcheck']
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- toYaml .Values.securityContext | nindent 8 }}
|
{{- toYaml .Values.securityContext | nindent 8 }}
|
||||||
restartPolicy: Never
|
restartPolicy: Never
|
||||||
|
|||||||
@@ -16,11 +16,11 @@ spec:
|
|||||||
{{- include "spire-server.selectorLabels" . | nindent 4 }}
|
{{- include "spire-server.selectorLabels" . | nindent 4 }}
|
||||||
ports:
|
ports:
|
||||||
- name: tornjak-srv-http
|
- name: tornjak-srv-http
|
||||||
port: {{ .Values.tornjak.service.portHttp }}
|
port: {{ .Values.tornjak.service.ports.http }}
|
||||||
targetPort: tornjak-http
|
targetPort: tornjak-http
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
- name: tornjak-srv-https
|
- name: tornjak-srv-https
|
||||||
port: {{ .Values.tornjak.service.portHttps }}
|
port: {{ .Values.tornjak.service.ports.https }}
|
||||||
targetPort: tornjak-https
|
targetPort: tornjak-https
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -362,8 +362,10 @@ tornjak:
|
|||||||
|
|
||||||
service:
|
service:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
portHttp: 10080
|
# -- Ports for tornjak
|
||||||
portHttps: 10443
|
ports:
|
||||||
|
http: 10080
|
||||||
|
https: 10443
|
||||||
annotations: {}
|
annotations: {}
|
||||||
|
|
||||||
startupProbe:
|
startupProbe:
|
||||||
|
|||||||
Reference in New Issue
Block a user