diff --git a/README.md b/README.md index 2205982..af8c07a 100644 --- a/README.md +++ b/README.md @@ -97,35 +97,35 @@ Any of this command have its own help ##### Decrypt ``` -$ helm secrets dec example/helm_vars/projectX/production/us-east-1/java-app/secrets.yaml -Decrypting example/helm_vars/projectX/production/us-east-1/java-app/secrets.yaml +$ helm secrets dec example/helm_vars/projectX/sandbox/us-east-1/java-app/secrets.yaml +Decrypting example/helm_vars/projectX/sandbox/us-east-1/java-app/secrets.yaml ``` -As the output you will get example/helm_vars/projectX/production/us-east-1/java-app/secrets.yaml.dec with decrypted secrets inside +As the output you will get example/helm_vars/projectX/sandbox/us-east-1/java-app/secrets.yaml.dec with decrypted secrets inside ``` -secret_production_projectx: secret_foo_123 +secret_sandbox_projectx: secret_foo_123 ``` ##### Encrypt Decrypt ``` -$ helm secrets dec example/helm_vars/projectX/production/us-east-1/java-app/secrets.yaml -Decrypting example/helm_vars/projectX/production/us-east-1/java-app/secrets.yaml +$ helm secrets dec example/helm_vars/projectX/sandbox/us-east-1/java-app/secrets.yaml +Decrypting example/helm_vars/projectX/sandbox/us-east-1/java-app/secrets.yaml ``` Now encrypt ``` -$ helm secrets enc example/helm_vars/projectX/production/us-east-1/java-app/secrets.yaml -Encrypting example/helm_vars/projectX/production/us-east-1/java-app/secrets.yaml -Encrypted example/helm_vars/projectX/production/us-east-1/java-app/secrets.yaml +$ helm secrets enc example/helm_vars/projectX/sandbox/us-east-1/java-app/secrets.yaml +Encrypting example/helm_vars/projectX/sandbox/us-east-1/java-app/secrets.yaml +Encrypted example/helm_vars/projectX/sandbox/us-east-1/java-app/secrets.yaml ``` ##### View With this option you will get decrypted file on stdout ``` -$ helm secrets view example/helm_vars/projectX/production/us-east-1/java-app/secrets.yaml -secret_production_projectx: secret_foo_123 +$ helm secrets view example/helm_vars/projectX/sandbox/us-east-1/java-app/secrets.yaml +secret_sandbox_projectx: secret_foo_123 ``` ##### Edit Currently will open vim with decrypted data from secret and on save will encrypt file with new edited data. If you quit without any modification no changes will be saved. ``` -$ helm secrets edit example/helm_vars/projectX/production/us-east-1/java-app/secrets.yaml +$ helm secrets edit example/helm_vars/projectX/sandbox/us-east-1/java-app/secrets.yaml ``` There is new feature in SOPS master that allows using $EDITOR to spcify editor used by sops but not released yet. @@ -133,8 +133,8 @@ There is new feature in SOPS master that allows using $EDITOR to spcify editor u Now clean dec file after manual decrypt ``` -$ helm secrets clean example/helm_vars/projectX/production/us-east-1/java-app/ -example/helm_vars/projectX/production/us-east-1/java-app/secrets.yaml.dec +$ helm secrets clean example/helm_vars/projectX/sandbox/us-east-1/java-app/ +example/helm_vars/projectX/sandbox/us-east-1/java-app/secrets.yaml.dec ``` If you use git there is commit hook that prevents commiting decrypted files and youo can add all *.dec files in you charts project ```.gitignore``` file. @@ -211,7 +211,7 @@ Everything is described in SOPS docs - links in this project description. Running helm to install/upgrade chart with our secret files is simple with helm-wrapper which will decrypt on-the-fly and use decrypted secret files specified by us. Real example of helm-wrapper usage with simple java helloworld application. ``` -AWS_PROFILE=production helm-secrets upgrade --install --timeout 600 --wait helloworld stable/java-app --kube-context=production --namespace=projectx --set global.app_version=bff8fc4 -f helm_vars/projectx/sandbox/us-east-1/java-app/helloworld/secrets.yaml -f helm_vars/projectx/sandbox/us-east-1/java-app/helloworld/values.yaml -f helm_vars/secrets.yaml -f helm_vars/values.yaml +AWS_PROFILE=sandbox helm-secrets upgrade --install --timeout 600 --wait helloworld stable/java-app --kube-context=sandbox --namespace=projectx --set global.app_version=bff8fc4 -f helm_vars/projectx/sandbox/us-east-1/java-app/helloworld/secrets.yaml -f helm_vars/projectx/sandbox/us-east-1/java-app/helloworld/values.yaml -f helm_vars/secrets.yaml -f helm_vars/values.yaml >>>>>> Decrypt Decrypting helm_vars/projectx/sandbox/us-east-1/java-app/helloworld/secrets.yaml >>>>>> Decrypt @@ -250,7 +250,7 @@ You can see that we use global secret file and specific for this app in this pro Even when helm failed then decrypted files are cleaned ``` -AWS_PROFILE=production helm-wrapper upgrade --install --timeout 600 --wait helloworld stable/java-app --kube-context=wrongcontext --namespace=projectx --set global.app_version=bff8fc4 -f helm_vars/projectx/sandbox/us-east-1/java-app/helloworld/secrets.yaml -f helm_vars/projectx/sandbox/us-east-1/java-app/helloworld/values.yaml -f helm_vars/secrets.yaml -f helm_vars/values.yaml +AWS_PROFILE=sandbox helm-wrapper upgrade --install --timeout 600 --wait helloworld stable/java-app --kube-context=wrongcontext --namespace=projectx --set global.app_version=bff8fc4 -f helm_vars/projectx/sandbox/us-east-1/java-app/helloworld/secrets.yaml -f helm_vars/projectx/sandbox/us-east-1/java-app/helloworld/values.yaml -f helm_vars/secrets.yaml -f helm_vars/values.yaml >>>>>> Decrypt Decrypting helm_vars/projectx/sandbox/us-east-1/java-app/helloworld/secrets.yaml >>>>>> Decrypt