diff --git a/charts/rss2twitter/Chart.yaml b/charts/rss2twitter/Chart.yaml index 5750a91f7..461656d89 100644 --- a/charts/rss2twitter/Chart.yaml +++ b/charts/rss2twitter/Chart.yaml @@ -2,4 +2,4 @@ apiVersion: v2 description: A Helm chart for https://github.com/umputun/rss2twitter name: rss2twitter type: application -version: 0.0.4 +version: 0.0.5 diff --git a/charts/rss2twitter/README.md b/charts/rss2twitter/README.md new file mode 100644 index 000000000..b20038839 --- /dev/null +++ b/charts/rss2twitter/README.md @@ -0,0 +1,9 @@ +# RSS 2 Twitter + +This chart deploys [rss2twitter](https://github.com/umputun/rss2twitter). + +## Running this yourself + +``` +helm install -f values.yaml -f values.local.yaml --name rss2twitter . +``` diff --git a/charts/rss2twitter/tests/custom_values_test.yaml b/charts/rss2twitter/tests/custom_values_test.yaml new file mode 100644 index 000000000..e2487f5fd --- /dev/null +++ b/charts/rss2twitter/tests/custom_values_test.yaml @@ -0,0 +1,32 @@ +suite: Test with custom values +templates: + - _helper.tpl + - deployment.yaml + - exclusion-patterns-configmap.yaml + - secret.yaml +tests: + - it: should create a Secret with the correct value + set: + twitter: + consumerKey: consumer-key + consumerSecret: consumer-secret + accessToken: access-token + accessSecret: access-secret + template: secret.yaml + asserts: + - hasDocuments: + count: 1 + - isKind: + of: Secret + - equal: + path: data.TWI_CONSUMER_KEY + value: Y29uc3VtZXIta2V5 + - equal: + path: data.TWI_CONSUMER_SECRET + value: Y29uc3VtZXItc2VjcmV0 + - equal: + path: data.TWI_ACCESS_TOKEN + value: YWNjZXNzLXRva2Vu + - equal: + path: data.TWI_ACCESS_SECRET + value: YWNjZXNzLXNlY3JldA== diff --git a/charts/rss2twitter/tests/defaults_values_test.yaml b/charts/rss2twitter/tests/defaults_values_test.yaml new file mode 100644 index 000000000..5f172b639 --- /dev/null +++ b/charts/rss2twitter/tests/defaults_values_test.yaml @@ -0,0 +1,17 @@ +suite: Test with default values +templates: + - _helper.tpl + - deployment.yaml + - exclusion-patterns-configmap.yaml + - secret.yaml +tests: + - it: should define the default deployment with the image umputun/rss2twitter + template: deployment.yaml + asserts: + - hasDocuments: + count: 1 + - isKind: + of: Deployment + - equal: + path: spec.template.spec.containers[0].image + value: umputun/rss2twitter:v0.7.0 diff --git a/charts/rss2twitter/values.yaml b/charts/rss2twitter/values.yaml index c84424cdf..3f2afca6a 100644 --- a/charts/rss2twitter/values.yaml +++ b/charts/rss2twitter/values.yaml @@ -16,7 +16,7 @@ podSecurityContext: {} securityContext: capabilities: drop: - - ALL + - ALL readOnlyRootFilesystem: true runAsUser: 1001 # app resources: {} @@ -40,3 +40,9 @@ env: # disables publishing to twitter and sends updates to logger only dryMode: true debugMode: false + +twitter: + consumerKey: "" + consumerSecret: "" + accessToken: "" + accessSecret: ""