suite: addon vpn templates: - common.yaml tests: - it: default should pass asserts: - hasDocuments: count: 2 - documentIndex: &DeploymentDocument 0 isKind: of: Deployment - documentIndex: 1 isKind: of: Service - documentIndex: *DeploymentDocument not: true equal: path: spec.template.spec.containers[0].name value: vpn - it: addon enabled should pass set: addons: vpn: enabled: true asserts: - hasDocuments: count: 2 - documentIndex: &DeploymentDocument 0 isKind: of: Deployment - documentIndex: 1 isKind: of: Service - documentIndex: *DeploymentDocument equal: path: spec.template.spec.containers[1].name value: openvpn - it: addon enabled with configFile should pass set: addons: vpn: enabled: true configFile: test asserts: - hasDocuments: count: 3 - documentIndex: &AddonVPNConfigSecretDocument 0 isKind: of: Secret - documentIndex: &DeploymentDocument 1 isKind: of: Deployment - documentIndex: *DeploymentDocument contains: path: spec.template.spec.containers[1].volumeMounts content: mountPath: /vpn/vpn.conf name: vpnconfig subPath: vpnConfigfile - documentIndex: *DeploymentDocument contains: path: spec.template.spec.volumes content: name: vpnconfig secret: items: - key: vpnConfigfile path: vpnConfigfile secretName: RELEASE-NAME-kah-common-chart-vpnconfig - documentIndex: *AddonVPNConfigSecretDocument equal: path: metadata.name value: RELEASE-NAME-kah-common-chart-vpnconfig - it: addon enabled with existing configFile secret should pass set: addons: vpn: enabled: true configFileSecret: test-secret asserts: - hasDocuments: count: 2 - documentIndex: &DeploymentDocument 0 isKind: of: Deployment - documentIndex: *DeploymentDocument contains: path: spec.template.spec.containers[1].volumeMounts content: mountPath: /vpn/vpn.conf name: vpnconfig subPath: vpnConfigfile - documentIndex: *DeploymentDocument contains: path: spec.template.spec.volumes content: name: vpnconfig secret: items: - key: vpnConfigfile path: vpnConfigfile secretName: test-secret - it: addon enabled with managed secret should pass set: addons: vpn: enabled: true openvpn: auth: | asserts: - hasDocuments: count: 3 - documentIndex: &SecretDocument 0 isKind: of: Secret - documentIndex: &DeploymentDocument 1 isKind: of: Deployment - documentIndex: 2 isKind: of: Service - documentIndex: *DeploymentDocument not: true equal: path: spec.template.spec.containers[0].name value: vpn