mirror of
https://github.com/truenas/charts.git
synced 2026-06-17 07:27:44 +08:00
fix indentation
This commit is contained in:
@@ -37,14 +37,15 @@ tests:
|
||||
value:
|
||||
type: ClusterIP
|
||||
publishNotReadyAddresses: false
|
||||
- documentIndex: *serviceDoc
|
||||
equal:
|
||||
path: ports
|
||||
value:
|
||||
ports:
|
||||
- name: port-name
|
||||
port: 12345
|
||||
protocol: TCP
|
||||
targetPort: 12345
|
||||
selector:
|
||||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/name: common-test
|
||||
pod.name: my-workload
|
||||
|
||||
- it: should pass with type ClusterIP and available options set
|
||||
set:
|
||||
@@ -110,10 +111,7 @@ tests:
|
||||
sessionAffinityConfig:
|
||||
clientIP:
|
||||
timeoutSeconds: 100
|
||||
- documentIndex: *serviceDoc
|
||||
equal:
|
||||
path: ports
|
||||
value:
|
||||
ports:
|
||||
- name: port-name
|
||||
port: 12345
|
||||
protocol: TCP
|
||||
@@ -122,3 +120,7 @@ tests:
|
||||
port: 12344
|
||||
protocol: TCP
|
||||
targetPort: 12346
|
||||
selector:
|
||||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/name: common-test
|
||||
pod.name: my-workload
|
||||
|
||||
@@ -31,10 +31,7 @@ tests:
|
||||
path: spec
|
||||
value:
|
||||
publishNotReadyAddresses: false
|
||||
- documentIndex: *serviceDoc
|
||||
equal:
|
||||
path: ports
|
||||
value:
|
||||
ports:
|
||||
- name: port-name
|
||||
port: 12345
|
||||
protocol: TCP
|
||||
@@ -87,10 +84,7 @@ tests:
|
||||
sessionAffinityConfig:
|
||||
clientIP:
|
||||
timeoutSeconds: 100
|
||||
- documentIndex: *serviceDoc
|
||||
equal:
|
||||
path: ports
|
||||
value:
|
||||
ports:
|
||||
- name: port-name
|
||||
port: 12345
|
||||
protocol: TCP
|
||||
|
||||
@@ -33,10 +33,7 @@ tests:
|
||||
type: ExternalName
|
||||
externalName: my-external-name
|
||||
publishNotReadyAddresses: false
|
||||
- documentIndex: *serviceDoc
|
||||
equal:
|
||||
path: ports
|
||||
value:
|
||||
ports:
|
||||
- name: port-name
|
||||
port: 12345
|
||||
protocol: TCP
|
||||
@@ -96,10 +93,7 @@ tests:
|
||||
sessionAffinityConfig:
|
||||
clientIP:
|
||||
timeoutSeconds: 100
|
||||
- documentIndex: *serviceDoc
|
||||
equal:
|
||||
path: ports
|
||||
value:
|
||||
ports:
|
||||
- name: port-name
|
||||
port: 12345
|
||||
protocol: TCP
|
||||
|
||||
@@ -37,14 +37,15 @@ tests:
|
||||
value:
|
||||
type: LoadBalancer
|
||||
publishNotReadyAddresses: false
|
||||
- documentIndex: *serviceDoc
|
||||
equal:
|
||||
path: ports
|
||||
value:
|
||||
ports:
|
||||
- name: port-name
|
||||
port: 12345
|
||||
protocol: TCP
|
||||
targetPort: 12345
|
||||
selector:
|
||||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/name: common-test
|
||||
pod.name: my-workload
|
||||
|
||||
- it: should pass with type LoadBalancer and available options set
|
||||
set:
|
||||
@@ -122,10 +123,7 @@ tests:
|
||||
sessionAffinityConfig:
|
||||
clientIP:
|
||||
timeoutSeconds: 100
|
||||
- documentIndex: *serviceDoc
|
||||
equal:
|
||||
path: ports
|
||||
value:
|
||||
ports:
|
||||
- name: port-name
|
||||
port: 12345
|
||||
protocol: TCP
|
||||
@@ -134,3 +132,7 @@ tests:
|
||||
port: 12344
|
||||
protocol: TCP
|
||||
targetPort: 12346
|
||||
selector:
|
||||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/name: common-test
|
||||
pod.name: my-workload
|
||||
|
||||
@@ -122,7 +122,7 @@ tests:
|
||||
of: Service
|
||||
- documentIndex: *serviceDoc
|
||||
equal:
|
||||
path: selector
|
||||
path: spec.selector
|
||||
value:
|
||||
pod.name: my-workload
|
||||
app.kubernetes.io/name: common-test
|
||||
@@ -155,7 +155,7 @@ tests:
|
||||
of: Service
|
||||
- documentIndex: *serviceDoc
|
||||
equal:
|
||||
path: selector
|
||||
path: spec.selector
|
||||
value:
|
||||
pod.name: my-workload
|
||||
app.kubernetes.io/name: common-test
|
||||
|
||||
@@ -38,15 +38,16 @@ tests:
|
||||
value:
|
||||
type: NodePort
|
||||
publishNotReadyAddresses: false
|
||||
- documentIndex: *serviceDoc
|
||||
equal:
|
||||
path: ports
|
||||
value:
|
||||
ports:
|
||||
- name: port-name
|
||||
port: 12345
|
||||
protocol: TCP
|
||||
targetPort: 12345
|
||||
nodePort: 30000
|
||||
selector:
|
||||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/name: common-test
|
||||
pod.name: my-workload
|
||||
|
||||
- it: should pass with type NodePort and available options set
|
||||
set:
|
||||
@@ -117,10 +118,7 @@ tests:
|
||||
sessionAffinityConfig:
|
||||
clientIP:
|
||||
timeoutSeconds: 100
|
||||
- documentIndex: *serviceDoc
|
||||
equal:
|
||||
path: ports
|
||||
value:
|
||||
ports:
|
||||
- name: port-name
|
||||
port: 12345
|
||||
protocol: TCP
|
||||
@@ -131,3 +129,7 @@ tests:
|
||||
protocol: TCP
|
||||
targetPort: 12346
|
||||
nodePort: 30001
|
||||
selector:
|
||||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/name: common-test
|
||||
pod.name: my-workload
|
||||
|
||||
@@ -83,19 +83,12 @@ spec:
|
||||
{{- include "ix.v1.common.lib.service.spec.externalName" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim | nindent 2 -}}
|
||||
{{- else if eq $svcType "ExternalIP" -}}
|
||||
{{- include "ix.v1.common.lib.service.spec.externalIP" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim | nindent 2 -}}
|
||||
{{- end -}}
|
||||
{{- /* Following apply to all service types */}}
|
||||
publishNotReadyAddresses: {{ include "ix.v1.common.lib.service.publishNotReadyAddresses" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim }}
|
||||
{{- with (include "ix.v1.common.lib.service.externalIPs" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim) }}
|
||||
externalIPs:
|
||||
{{- . | nindent 2 }}
|
||||
{{- end -}}
|
||||
{{- include "ix.v1.common.lib.service.sessionAffinity" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim | nindent 2 }}
|
||||
ports:
|
||||
{{- include "ix.v1.common.lib.service.ports" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim | nindent 2 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
{{- include "ix.v1.common.lib.service.ports" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim | nindent 4 }}
|
||||
{{- if not (mustHas $svcType $specialTypes) }}
|
||||
selector:
|
||||
{{- include "ix.v1.common.lib.metadata.selectorLabels" (dict "rootCtx" $rootCtx "podName" $podValues.shortName) | trim | nindent 2 -}}
|
||||
selector:
|
||||
{{- include "ix.v1.common.lib.metadata.selectorLabels" (dict "rootCtx" $rootCtx "podName" $podValues.shortName) | trim | nindent 4 -}}
|
||||
{{- end -}}
|
||||
{{- if eq $svcType "ExternalIP" -}}
|
||||
{{/* TODO: endpointsslice for externalIP */}}
|
||||
|
||||
@@ -10,7 +10,12 @@ objectData: The service object data
|
||||
{{- $objectData := .objectData }}
|
||||
|
||||
type: ClusterIP
|
||||
|
||||
publishNotReadyAddresses: {{ include "ix.v1.common.lib.service.publishNotReadyAddresses" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim }}
|
||||
{{- with (include "ix.v1.common.lib.service.externalIPs" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim) }}
|
||||
externalIPs:
|
||||
{{- . | nindent 2 }}
|
||||
{{- end -}}
|
||||
{{- include "ix.v1.common.lib.service.sessionAffinity" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim | nindent 0 }}
|
||||
{{- include "ix.v1.common.lib.service.clusterIP" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim | nindent 0 }}
|
||||
{{- include "ix.v1.common.lib.service.ipFamily" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim | nindent 0 }}
|
||||
{{- end -}}
|
||||
|
||||
@@ -9,5 +9,11 @@ objectData: The service object data
|
||||
{{- $rootCtx := .rootCtx -}}
|
||||
{{- $objectData := .objectData }}
|
||||
|
||||
publishNotReadyAddresses: {{ include "ix.v1.common.lib.service.publishNotReadyAddresses" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim }}
|
||||
{{- with (include "ix.v1.common.lib.service.externalIPs" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim) }}
|
||||
externalIPs:
|
||||
{{- . | nindent 2 }}
|
||||
{{- end -}}
|
||||
{{- include "ix.v1.common.lib.service.sessionAffinity" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim | nindent 0 }}
|
||||
{{- include "ix.v1.common.lib.service.externalTrafficPolicy" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim | nindent 0 }}
|
||||
{{- end -}}
|
||||
|
||||
@@ -15,6 +15,12 @@ objectData: The service object data
|
||||
|
||||
type: ExternalName
|
||||
externalName: {{ tpl $objectData.externalName $rootCtx }}
|
||||
publishNotReadyAddresses: {{ include "ix.v1.common.lib.service.publishNotReadyAddresses" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim }}
|
||||
{{- with (include "ix.v1.common.lib.service.externalIPs" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim) }}
|
||||
externalIPs:
|
||||
{{- . | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- include "ix.v1.common.lib.service.sessionAffinity" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim | nindent 0 }}
|
||||
{{- include "ix.v1.common.lib.service.clusterIP" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim | nindent 0 }}
|
||||
{{- include "ix.v1.common.lib.service.externalTrafficPolicy" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim | nindent 0 }}
|
||||
{{- end -}}
|
||||
|
||||
@@ -10,6 +10,11 @@ objectData: The service object data
|
||||
{{- $objectData := .objectData }}
|
||||
|
||||
type: LoadBalancer
|
||||
publishNotReadyAddresses: {{ include "ix.v1.common.lib.service.publishNotReadyAddresses" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim }}
|
||||
{{- with (include "ix.v1.common.lib.service.externalIPs" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim) }}
|
||||
externalIPs:
|
||||
{{- . | nindent 2 }}
|
||||
{{- end -}}
|
||||
{{- with $objectData.loadBalancerIP }}
|
||||
loadBalancerIP: {{ tpl . $rootCtx }}
|
||||
{{- end -}}
|
||||
@@ -20,8 +25,8 @@ loadBalancerSourceRanges:
|
||||
- {{ tpl . $rootCtx }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- include "ix.v1.common.lib.service.clusterIP" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim | nindent 0 }}
|
||||
{{- include "ix.v1.common.lib.service.ipFamily" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim | nindent 0 }}
|
||||
{{- include "ix.v1.common.lib.service.externalTrafficPolicy" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim | nindent 0 }}
|
||||
{{- include "ix.v1.common.lib.service.sessionAffinity" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim | nindent 0 }}
|
||||
{{- end -}}
|
||||
|
||||
@@ -10,6 +10,12 @@ objectData: The service object data
|
||||
{{- $objectData := .objectData }}
|
||||
|
||||
type: NodePort
|
||||
publishNotReadyAddresses: {{ include "ix.v1.common.lib.service.publishNotReadyAddresses" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim }}
|
||||
{{- with (include "ix.v1.common.lib.service.externalIPs" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim) }}
|
||||
externalIPs:
|
||||
{{- . | nindent 2 }}
|
||||
{{- end -}}
|
||||
{{- include "ix.v1.common.lib.service.sessionAffinity" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim | nindent 0 }}
|
||||
{{- include "ix.v1.common.lib.service.clusterIP" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim | nindent 0 }}
|
||||
{{- include "ix.v1.common.lib.service.ipFamily" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim | nindent 0 }}
|
||||
{{- include "ix.v1.common.lib.service.externalTrafficPolicy" (dict "rootCtx" $rootCtx "objectData" $objectData) | trim | nindent 0 }}
|
||||
|
||||
Reference in New Issue
Block a user