-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow only truststore to be set (#1)
Previously when setting up tls you had to specify both the keystore and truststore. Now, either one can be specified.
- Loading branch information
Showing
8 changed files
with
156 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Tests | ||
run: make test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
*.png | ||
tests | ||
Makefile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
HELM_UNITTEST_VERSION?=3.9.3-0.2.11 | ||
|
||
.PHONY: test | ||
test: ## Run the helm unittest | ||
docker run -i $(shell [ -t 0 ] && echo '-t') --rm -v .:/apps quintush/helm-unittest:$(HELM_UNITTEST_VERSION) -3 . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
suite: TLS tests | ||
templates: | ||
- deployment.yaml | ||
tests: | ||
- it: should not have any JVM opts set if TLS is disabled | ||
set: | ||
tls.enabled: false | ||
launcherEnabled: true | ||
asserts: | ||
- isKind: | ||
of: Deployment | ||
- contains: | ||
path: spec.template.spec.containers[0].env | ||
content: | ||
name: VKCONFIG_JVM_OPTS | ||
value: "" | ||
- it: should have JVM opts set if TLS is configured with all opts | ||
set: | ||
tls: | ||
enabled: true | ||
trustStoreMountPath: /truststore | ||
trustStoreSecretKey: truststore | ||
trustStoreSecretName: trust-store-secret | ||
keyStoreMountPath: /keystore | ||
keyStoreSecretKey: keystore | ||
keyStorePassword: pwd | ||
keyStoreSecretName: key-store-secret | ||
launcherEnabled: true | ||
asserts: | ||
- isKind: | ||
of: Deployment | ||
- contains: | ||
path: spec.template.spec.volumes | ||
content: | ||
name: truststore | ||
secret: | ||
secretName: trust-store-secret | ||
- contains: | ||
path: spec.template.spec.volumes | ||
content: | ||
name: keystore | ||
secret: | ||
secretName: key-store-secret | ||
- contains: | ||
path: spec.template.spec.containers[0].env | ||
content: | ||
name: VKCONFIG_JVM_OPTS | ||
value: '-Djavax.net.ssl.trustStore=/truststore/truststore-Djavax.net.ssl.keyStore=/keystore/keystore -Djavax.net.ssl.keyStorePassword=pwd ' | ||
- it: should have JVM opts set if TLS is configured with just truststore | ||
set: | ||
tls: | ||
enabled: true | ||
trustStoreMountPath: /truststore | ||
trustStoreSecretKey: truststore | ||
trustStoreSecretName: trust-store-secret | ||
launcherEnabled: true | ||
asserts: | ||
- isKind: | ||
of: Deployment | ||
- contains: | ||
path: spec.template.spec.volumes | ||
content: | ||
name: truststore | ||
secret: | ||
secretName: trust-store-secret | ||
- notContains: | ||
path: spec.template.spec.volumes | ||
any: true | ||
content: | ||
name: keystore | ||
- contains: | ||
path: spec.template.spec.containers[0].volumeMounts | ||
content: | ||
name: truststore | ||
mountPath: /truststore | ||
- notContains: | ||
path: spec.template.spec.containers[0].volumeMounts | ||
any: true | ||
content: | ||
name: keystore | ||
- contains: | ||
path: spec.template.spec.containers[0].env | ||
content: | ||
name: VKCONFIG_JVM_OPTS | ||
value: '-Djavax.net.ssl.trustStore=/truststore/truststore' | ||
- it: should have JVM opts set if TLS is configured with just keystore | ||
set: | ||
tls: | ||
enabled: true | ||
keyStoreMountPath: /keystore | ||
keyStoreSecretKey: keystore | ||
keyStoreSecretName: keystore-secret | ||
keyStorePassword: my-secret | ||
launcherEnabled: true | ||
asserts: | ||
- isKind: | ||
of: Deployment | ||
- notContains: | ||
path: spec.template.spec.volumes | ||
any: true | ||
content: | ||
name: truststore | ||
- contains: | ||
path: spec.template.spec.volumes | ||
content: | ||
name: keystore | ||
secret: | ||
secretName: keystore-secret | ||
- notContains: | ||
path: spec.template.spec.containers[0].volumeMounts | ||
any: true | ||
content: | ||
name: truststore | ||
- contains: | ||
path: spec.template.spec.containers[0].volumeMounts | ||
content: | ||
name: keystore | ||
mountPath: /keystore | ||
- contains: | ||
path: spec.template.spec.containers[0].env | ||
content: | ||
name: VKCONFIG_JVM_OPTS | ||
value: '-Djavax.net.ssl.keyStore=/keystore/keystore -Djavax.net.ssl.keyStorePassword=my-secret ' |