mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 00:47:04 +02:00
feat(common)!: Release version 1.0.0 (#68)
- Removed: **BREAKING**: Removed support for HorizontalPodAutoscaler - Added: Support services have extraSelectorLabels (#58) - Added: support for `httpGet` probes - Added: support for setting labels / annotations on volumeClaimTemplates - Changed: **BREAKING**: Restructure of template components. All Helm templates have been renamed / namespaced. E.g. `common.values.setup` has now become `bjw-s.common.loader.init`. - Changed: **BREAKING**: Raised minimum supported k8s version to 1.22 - Changed: **BREAKING**: Renamed `configmap` key to `configMaps` - Changed: **BREAKING**: Moved `serviceMonitor` from `service` to its own key - Changed: **BREAKING**: Renamed `secret` key to `secrets`, which now works similar to `configMaps` - Changed: Updated code-server image to v4.8.2 - Changed: Updated gluetun image to v3.32.0 - Fixed: Fix NOTES always showing ingress protocol as http (#62) Signed-off-by: Gavin Mogan <git@gavinmogan.com> Co-authored-by: Gavin Mogan <github@gavinmogan.com> Co-authored-by: Gabe Cook <gabe565@gmail.com>
This commit is contained in:
parent
98ee81df4e
commit
ae4233c77f
94 changed files with 1126 additions and 976 deletions
|
@ -29,15 +29,15 @@ tests:
|
|||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Service
|
||||
- documentIndex: &DeploymentDocument 1
|
||||
- documentIndex: &DeploymentDocument 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: &AddonServiceDocument 2
|
||||
isKind:
|
||||
of: Service
|
||||
- documentIndex: 1
|
||||
isKind:
|
||||
of: Service
|
||||
- documentIndex: *DeploymentDocument
|
||||
equal:
|
||||
path: spec.template.spec.containers[1].name
|
||||
|
@ -63,87 +63,6 @@ tests:
|
|||
- documentIndex: &AddonDeployKeySecretDocument 0
|
||||
isKind:
|
||||
of: Secret
|
||||
- documentIndex: &DeploymentDocument 2
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *DeploymentDocument
|
||||
contains:
|
||||
path: spec.template.spec.containers[1].volumeMounts
|
||||
content:
|
||||
mountPath: /root/.ssh/id_rsa
|
||||
name: deploykey
|
||||
subPath: id_rsa
|
||||
- documentIndex: *DeploymentDocument
|
||||
contains:
|
||||
path: spec.template.spec.volumes
|
||||
content:
|
||||
name: deploykey
|
||||
secret:
|
||||
defaultMode: 256
|
||||
items:
|
||||
- key: id_rsa
|
||||
path: id_rsa
|
||||
secretName: RELEASE-NAME-deploykey
|
||||
- documentIndex: *AddonDeployKeySecretDocument
|
||||
equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME-deploykey
|
||||
|
||||
- it: addon enabled with InlineBase64 deployKey should pass
|
||||
set:
|
||||
addons:
|
||||
codeserver:
|
||||
enabled: true
|
||||
git:
|
||||
deployKeyBase64: dGVzdEtleQ==
|
||||
volumeMounts:
|
||||
- name: "config"
|
||||
mountPath: "/data/config"
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 4
|
||||
- documentIndex: &AddonDeployKeySecretDocument 0
|
||||
isKind:
|
||||
of: Secret
|
||||
- documentIndex: &DeploymentDocument 2
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *DeploymentDocument
|
||||
contains:
|
||||
path: spec.template.spec.containers[1].volumeMounts
|
||||
content:
|
||||
mountPath: /root/.ssh/id_rsa
|
||||
name: deploykey
|
||||
subPath: id_rsa
|
||||
- documentIndex: *DeploymentDocument
|
||||
contains:
|
||||
path: spec.template.spec.volumes
|
||||
content:
|
||||
name: deploykey
|
||||
secret:
|
||||
defaultMode: 256
|
||||
items:
|
||||
- key: id_rsa
|
||||
path: id_rsa
|
||||
secretName: RELEASE-NAME-deploykey
|
||||
- documentIndex: *AddonDeployKeySecretDocument
|
||||
equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME-deploykey
|
||||
|
||||
- it: addon enabled with existingSecret deployKey should pass
|
||||
set:
|
||||
addons:
|
||||
codeserver:
|
||||
enabled: true
|
||||
git:
|
||||
deployKeySecret: test-secret
|
||||
volumeMounts:
|
||||
- name: "config"
|
||||
mountPath: "/data/config"
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &DeploymentDocument 1
|
||||
isKind:
|
||||
of: Deployment
|
||||
|
@ -154,6 +73,87 @@ tests:
|
|||
mountPath: /root/.ssh/id_rsa
|
||||
name: deploykey
|
||||
subPath: id_rsa
|
||||
- documentIndex: *DeploymentDocument
|
||||
contains:
|
||||
path: spec.template.spec.volumes
|
||||
content:
|
||||
name: deploykey
|
||||
secret:
|
||||
defaultMode: 256
|
||||
items:
|
||||
- key: id_rsa
|
||||
path: id_rsa
|
||||
secretName: RELEASE-NAME-addon-codeserver-deploykey
|
||||
- documentIndex: *AddonDeployKeySecretDocument
|
||||
equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME-addon-codeserver-deploykey
|
||||
|
||||
- it: addon enabled with InlineBase64 deployKey should pass
|
||||
set:
|
||||
addons:
|
||||
codeserver:
|
||||
enabled: true
|
||||
git:
|
||||
deployKeyBase64: dGVzdEtleQ==
|
||||
volumeMounts:
|
||||
- name: "config"
|
||||
mountPath: "/data/config"
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 4
|
||||
- documentIndex: &AddonDeployKeySecretDocument 0
|
||||
isKind:
|
||||
of: Secret
|
||||
- documentIndex: &DeploymentDocument 1
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *DeploymentDocument
|
||||
contains:
|
||||
path: spec.template.spec.containers[1].volumeMounts
|
||||
content:
|
||||
mountPath: /root/.ssh/id_rsa
|
||||
name: deploykey
|
||||
subPath: id_rsa
|
||||
- documentIndex: *DeploymentDocument
|
||||
contains:
|
||||
path: spec.template.spec.volumes
|
||||
content:
|
||||
name: deploykey
|
||||
secret:
|
||||
defaultMode: 256
|
||||
items:
|
||||
- key: id_rsa
|
||||
path: id_rsa
|
||||
secretName: RELEASE-NAME-addon-codeserver-deploykey
|
||||
- documentIndex: *AddonDeployKeySecretDocument
|
||||
equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME-addon-codeserver-deploykey
|
||||
|
||||
- it: addon enabled with existingSecret deployKey should pass
|
||||
set:
|
||||
addons:
|
||||
codeserver:
|
||||
enabled: true
|
||||
git:
|
||||
deployKeySecret: test-secret
|
||||
volumeMounts:
|
||||
- name: "config"
|
||||
mountPath: "/data/config"
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &DeploymentDocument 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *DeploymentDocument
|
||||
contains:
|
||||
path: spec.template.spec.containers[1].volumeMounts
|
||||
content:
|
||||
mountPath: /root/.ssh/id_rsa
|
||||
name: deploykey
|
||||
subPath: id_rsa
|
||||
- documentIndex: *DeploymentDocument
|
||||
contains:
|
||||
path: spec.template.spec.volumes
|
||||
|
|
|
@ -68,11 +68,63 @@ tests:
|
|||
items:
|
||||
- key: vpnConfigfile
|
||||
path: vpnConfigfile
|
||||
secretName: RELEASE-NAME-vpnconfig
|
||||
secretName: RELEASE-NAME-addon-vpn-config
|
||||
- documentIndex: *AddonVPNConfigSecretDocument
|
||||
equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME-vpnconfig
|
||||
value: RELEASE-NAME-addon-vpn-config
|
||||
|
||||
- it: addon enabled with up/down scripts should pass
|
||||
set:
|
||||
addons:
|
||||
vpn:
|
||||
enabled: true
|
||||
scripts:
|
||||
up: |
|
||||
test_up
|
||||
down: |
|
||||
test_down
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &AddonVPNConfigConfigMapDocument 0
|
||||
isKind:
|
||||
of: ConfigMap
|
||||
- documentIndex: &DeploymentDocument 1
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *DeploymentDocument
|
||||
contains:
|
||||
path: spec.template.spec.containers[1].volumeMounts
|
||||
content:
|
||||
mountPath: /gluetun/scripts/up.sh
|
||||
name: vpnscript
|
||||
subPath: up.sh
|
||||
- documentIndex: *DeploymentDocument
|
||||
contains:
|
||||
path: spec.template.spec.containers[1].volumeMounts
|
||||
content:
|
||||
mountPath: /gluetun/scripts/down.sh
|
||||
name: vpnscript
|
||||
subPath: down.sh
|
||||
- documentIndex: *DeploymentDocument
|
||||
contains:
|
||||
path: spec.template.spec.volumes
|
||||
content:
|
||||
configMap:
|
||||
items:
|
||||
- key: up.sh
|
||||
mode: 511
|
||||
path: up.sh
|
||||
- key: down.sh
|
||||
mode: 511
|
||||
path: down.sh
|
||||
name: RELEASE-NAME-addon-vpn
|
||||
name: vpnscript
|
||||
- documentIndex: *AddonVPNConfigConfigMapDocument
|
||||
equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME-addon-vpn
|
||||
|
||||
- it: addon enabled with existing configFile secret should pass
|
||||
set:
|
||||
|
|
|
@ -4,7 +4,7 @@ templates:
|
|||
tests:
|
||||
- it: default metadata should pass
|
||||
set:
|
||||
configmap:
|
||||
configMaps:
|
||||
config:
|
||||
enabled: true
|
||||
asserts:
|
||||
|
@ -21,11 +21,11 @@ tests:
|
|||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
helm.sh/chart: app-template-0.2.2
|
||||
helm.sh/chart: app-template-1.0.0
|
||||
|
||||
- it: custom metadata should pass
|
||||
set:
|
||||
configmap:
|
||||
configMaps:
|
||||
config:
|
||||
enabled: true
|
||||
annotations:
|
||||
|
@ -48,7 +48,7 @@ tests:
|
|||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
helm.sh/chart: app-template-0.2.2
|
||||
helm.sh/chart: app-template-1.0.0
|
||||
test_label: test
|
||||
|
||||
- it: custom metadata with global metadata should pass
|
||||
|
@ -58,7 +58,7 @@ tests:
|
|||
global_label: test
|
||||
annotations:
|
||||
global_annotation: test
|
||||
configmap:
|
||||
configMaps:
|
||||
config:
|
||||
enabled: true
|
||||
annotations:
|
||||
|
@ -83,5 +83,5 @@ tests:
|
|||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
global_label: test
|
||||
helm.sh/chart: app-template-0.2.2
|
||||
helm.sh/chart: app-template-1.0.0
|
||||
test_label: test
|
||||
|
|
|
@ -17,7 +17,7 @@ tests:
|
|||
|
||||
- it: with disabled configMap should pass
|
||||
set:
|
||||
configmap:
|
||||
configMaps:
|
||||
config:
|
||||
enabled: false
|
||||
asserts:
|
||||
|
@ -34,7 +34,7 @@ tests:
|
|||
|
||||
- it: with multiple configMap should pass
|
||||
set:
|
||||
configmap:
|
||||
configMaps:
|
||||
config:
|
||||
enabled: true
|
||||
data:
|
||||
|
@ -59,7 +59,7 @@ tests:
|
|||
|
||||
- it: default name should pass
|
||||
set:
|
||||
configmap:
|
||||
configMaps:
|
||||
config:
|
||||
enabled: true
|
||||
asserts:
|
||||
|
@ -75,7 +75,7 @@ tests:
|
|||
|
||||
- it: with nameOverride should pass
|
||||
set:
|
||||
configmap:
|
||||
configMaps:
|
||||
config:
|
||||
enabled: true
|
||||
nameOverride: http
|
||||
|
|
|
@ -4,7 +4,7 @@ templates:
|
|||
tests:
|
||||
- it: default metadata should pass
|
||||
set:
|
||||
configmap:
|
||||
configMaps:
|
||||
config:
|
||||
enabled: true
|
||||
data:
|
||||
|
|
|
@ -19,7 +19,7 @@ tests:
|
|||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
helm.sh/chart: app-template-0.2.2
|
||||
helm.sh/chart: app-template-1.0.0
|
||||
|
||||
- it: custom metadata should pass
|
||||
set:
|
||||
|
@ -45,7 +45,7 @@ tests:
|
|||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
helm.sh/chart: app-template-0.2.2
|
||||
helm.sh/chart: app-template-1.0.0
|
||||
test_label: test
|
||||
|
||||
- it: custom metadata with global metadata should pass
|
||||
|
@ -79,5 +79,5 @@ tests:
|
|||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
global_label: test
|
||||
helm.sh/chart: app-template-0.2.2
|
||||
helm.sh/chart: app-template-1.0.0
|
||||
test_label: test
|
||||
|
|
|
@ -19,7 +19,7 @@ tests:
|
|||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
helm.sh/chart: app-template-0.2.2
|
||||
helm.sh/chart: app-template-1.0.0
|
||||
|
||||
- it: custom metadata should pass
|
||||
set:
|
||||
|
@ -45,7 +45,7 @@ tests:
|
|||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
helm.sh/chart: app-template-0.2.2
|
||||
helm.sh/chart: app-template-1.0.0
|
||||
test_label: test
|
||||
|
||||
- it: custom metadata with global metadata should pass
|
||||
|
@ -79,5 +79,5 @@ tests:
|
|||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
global_label: test
|
||||
helm.sh/chart: app-template-0.2.2
|
||||
helm.sh/chart: app-template-1.0.0
|
||||
test_label: test
|
||||
|
|
|
@ -19,7 +19,7 @@ tests:
|
|||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
helm.sh/chart: app-template-0.2.2
|
||||
helm.sh/chart: app-template-1.0.0
|
||||
|
||||
- it: custom metadata should pass
|
||||
set:
|
||||
|
@ -45,7 +45,7 @@ tests:
|
|||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
helm.sh/chart: app-template-0.2.2
|
||||
helm.sh/chart: app-template-1.0.0
|
||||
test_label: test
|
||||
|
||||
- it: custom metadata with global metadata should pass
|
||||
|
@ -79,5 +79,5 @@ tests:
|
|||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
global_label: test
|
||||
helm.sh/chart: app-template-0.2.2
|
||||
helm.sh/chart: app-template-1.0.0
|
||||
test_label: test
|
||||
|
|
|
@ -19,7 +19,7 @@ tests:
|
|||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
helm.sh/chart: app-template-0.2.2
|
||||
helm.sh/chart: app-template-1.0.0
|
||||
|
||||
- it: custom metadata should pass
|
||||
set:
|
||||
|
@ -45,7 +45,7 @@ tests:
|
|||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
helm.sh/chart: app-template-0.2.2
|
||||
helm.sh/chart: app-template-1.0.0
|
||||
test_label: test
|
||||
|
||||
- it: custom metadata with global metadata should pass
|
||||
|
@ -79,5 +79,5 @@ tests:
|
|||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
global_label: test
|
||||
helm.sh/chart: app-template-0.2.2
|
||||
helm.sh/chart: app-template-1.0.0
|
||||
test_label: test
|
||||
|
|
|
@ -13,8 +13,10 @@ tests:
|
|||
equal:
|
||||
path: spec.rules[0].http.paths[0].backend
|
||||
value:
|
||||
serviceName: RELEASE-NAME
|
||||
servicePort: null
|
||||
service:
|
||||
name: RELEASE-NAME
|
||||
port:
|
||||
number: null
|
||||
|
||||
- it: custom service reference should pass
|
||||
set:
|
||||
|
@ -35,5 +37,7 @@ tests:
|
|||
equal:
|
||||
path: spec.rules[0].http.paths[0].backend
|
||||
value:
|
||||
serviceName: pathService
|
||||
servicePort: 1234
|
||||
service:
|
||||
name: pathService
|
||||
port:
|
||||
number: 1234
|
||||
|
|
|
@ -54,7 +54,7 @@ tests:
|
|||
configmap:
|
||||
enabled: true
|
||||
type: configMap
|
||||
name: "{{ include \"common.names.fullname\" $ }}-config"
|
||||
name: "{{ include \"bjw-s.common.lib.chart.names.fullname\" $ }}-config"
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
|
|
|
@ -11,6 +11,10 @@ tests:
|
|||
accessMode: "ReadWriteOnce"
|
||||
size: "10Gi"
|
||||
storageClass: "storage"
|
||||
labels:
|
||||
test: "label"
|
||||
annotations:
|
||||
test: "annotation"
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
|
@ -21,6 +25,10 @@ tests:
|
|||
value:
|
||||
metadata:
|
||||
name: storage
|
||||
labels:
|
||||
test: "label"
|
||||
annotations:
|
||||
test: "annotation"
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
|
|
|
@ -19,7 +19,7 @@ tests:
|
|||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
helm.sh/chart: app-template-0.2.2
|
||||
helm.sh/chart: app-template-1.0.0
|
||||
|
||||
- it: retain enabled should pass
|
||||
set:
|
||||
|
@ -42,7 +42,7 @@ tests:
|
|||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
helm.sh/chart: app-template-0.2.2
|
||||
helm.sh/chart: app-template-1.0.0
|
||||
|
||||
- it: custom metadata should pass
|
||||
set:
|
||||
|
@ -68,7 +68,7 @@ tests:
|
|||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
helm.sh/chart: app-template-0.2.2
|
||||
helm.sh/chart: app-template-1.0.0
|
||||
test_label: test
|
||||
|
||||
- it: custom metadata with global metadata should pass
|
||||
|
@ -102,5 +102,5 @@ tests:
|
|||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
global_label: test
|
||||
helm.sh/chart: app-template-0.2.2
|
||||
helm.sh/chart: app-template-1.0.0
|
||||
test_label: test
|
||||
|
|
|
@ -18,7 +18,7 @@ tests:
|
|||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
app.kubernetes.io/service: RELEASE-NAME
|
||||
helm.sh/chart: app-template-0.2.2
|
||||
helm.sh/chart: app-template-1.0.0
|
||||
|
||||
- it: custom metadata should pass
|
||||
set:
|
||||
|
@ -45,7 +45,7 @@ tests:
|
|||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
app.kubernetes.io/service: RELEASE-NAME
|
||||
helm.sh/chart: app-template-0.2.2
|
||||
helm.sh/chart: app-template-1.0.0
|
||||
test_label: test
|
||||
|
||||
- it: custom metadata with global metadata should pass
|
||||
|
@ -80,5 +80,5 @@ tests:
|
|||
app.kubernetes.io/name: RELEASE-NAME
|
||||
app.kubernetes.io/service: RELEASE-NAME
|
||||
global_label: test
|
||||
helm.sh/chart: app-template-0.2.2
|
||||
helm.sh/chart: app-template-1.0.0
|
||||
test_label: test
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
suite: service values
|
||||
suite: serviceMonitor values
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
|
@ -15,10 +15,9 @@ tests:
|
|||
|
||||
- it: a serviceMonitor is not created when disabled
|
||||
set:
|
||||
service:
|
||||
serviceMonitor:
|
||||
main:
|
||||
monitor:
|
||||
enabled: false
|
||||
enabled: false
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
|
@ -31,16 +30,72 @@ tests:
|
|||
|
||||
- it: a serviceMonitor is created
|
||||
set:
|
||||
service:
|
||||
serviceMonitor:
|
||||
main:
|
||||
monitor:
|
||||
enabled: true
|
||||
endpoints:
|
||||
- port: http
|
||||
scheme: http
|
||||
path: /metrics
|
||||
interval: 1m
|
||||
scrapeTimeout: 10s
|
||||
enabled: true
|
||||
endpoints:
|
||||
- port: http
|
||||
scheme: http
|
||||
path: /metrics
|
||||
interval: 1m
|
||||
scrapeTimeout: 10s
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &ServiceMonitorDocument 2
|
||||
isKind:
|
||||
of: ServiceMonitor
|
||||
- documentIndex: *ServiceMonitorDocument
|
||||
equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME
|
||||
- documentIndex: *ServiceMonitorDocument
|
||||
equal:
|
||||
path: spec.selector.matchLabels
|
||||
value:
|
||||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
app.kubernetes.io/service: main
|
||||
- documentIndex: *ServiceMonitorDocument
|
||||
equal:
|
||||
path: spec.endpoints
|
||||
value:
|
||||
- port: http
|
||||
scheme: http
|
||||
path: /metrics
|
||||
interval: 1m
|
||||
scrapeTimeout: 10s
|
||||
|
||||
- it: a serviceMonitor is created with nameOverride
|
||||
set:
|
||||
serviceMonitor:
|
||||
main:
|
||||
enabled: true
|
||||
nameOverride: test
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &ServiceMonitorDocument 2
|
||||
isKind:
|
||||
of: ServiceMonitor
|
||||
- documentIndex: *ServiceMonitorDocument
|
||||
equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME-test
|
||||
- documentIndex: *ServiceMonitorDocument
|
||||
equal:
|
||||
path: spec.selector.matchLabels
|
||||
value:
|
||||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
app.kubernetes.io/service: main
|
||||
|
||||
- it: a serviceMonitor is created with a templated service
|
||||
set:
|
||||
serviceMonitor:
|
||||
main:
|
||||
enabled: true
|
||||
serviceName: "{{ .Release.Name }}"
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
|
@ -58,29 +113,15 @@ tests:
|
|||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
app.kubernetes.io/service: RELEASE-NAME
|
||||
- documentIndex: *ServiceMonitorDocument
|
||||
equal:
|
||||
path: spec.endpoints
|
||||
value:
|
||||
- port: http
|
||||
scheme: http
|
||||
path: /metrics
|
||||
interval: 1m
|
||||
scrapeTimeout: 10s
|
||||
|
||||
- it: a serviceMonitor is created with nameOverride
|
||||
- it: a serviceMonitor is created with a custom selector
|
||||
set:
|
||||
service:
|
||||
serviceMonitor:
|
||||
main:
|
||||
nameOverride: test
|
||||
monitor:
|
||||
enabled: true
|
||||
endpoints:
|
||||
- port: http
|
||||
scheme: http
|
||||
path: /metrics
|
||||
interval: 1m
|
||||
scrapeTimeout: 10s
|
||||
enabled: true
|
||||
selector:
|
||||
mySelector:
|
||||
test: "true"
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
|
@ -90,20 +131,10 @@ tests:
|
|||
- documentIndex: *ServiceMonitorDocument
|
||||
equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME-test
|
||||
value: RELEASE-NAME
|
||||
- documentIndex: *ServiceMonitorDocument
|
||||
equal:
|
||||
path: spec.selector.matchLabels
|
||||
path: spec.selector
|
||||
value:
|
||||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
app.kubernetes.io/service: RELEASE-NAME-test
|
||||
- documentIndex: *ServiceMonitorDocument
|
||||
equal:
|
||||
path: spec.endpoints
|
||||
value:
|
||||
- port: http
|
||||
scheme: http
|
||||
path: /metrics
|
||||
interval: 1m
|
||||
scrapeTimeout: 10s
|
||||
mySelector:
|
||||
test: "true"
|
Loading…
Add table
Add a link
Reference in a new issue