Skip to content

Commit

Permalink
support passing secret-yaml as context to install-chart cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
olegs-codefresh authored Jan 8, 2018
1 parent dd71041 commit e910df1
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 5 deletions.
15 changes: 15 additions & 0 deletions examples/secret-yaml.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
# Using this example you can install helm mongodb chart and set the service type as LoadBalancer instaed default ClusterIp
# https://github.com/kubernetes/charts/blob/master/stable/mongodb/values.yaml
kind: context
owner: account
metadata:
name: helm-mongo-secret-values
spec:
type: secret-yaml
data:
# All the values will be encrypted
serviceType: LoadBalancer
image: mongo
type:
- "encrypted"
2 changes: 1 addition & 1 deletion lib/interface/cli/commands/context/create.cmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const command = new Command({
})
.positional('type', {
describe: 'Type of the context',
choices: ['config', 'secret', 'helm-repository', 'plain-yaml'],
choices: ['config', 'secret', 'helm-repository', 'plain-yaml', 'secret-yaml'],
})
.option('owner', {
describe: 'Owner of the context',
Expand Down
2 changes: 1 addition & 1 deletion lib/interface/cli/commands/context/get.cmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const command = new Command({
})
.option('type', {
describe: 'Specific type of context',
choices: ['config', 'secret', 'helm-repository'],
choices: ['config', 'secret', 'helm-repository', 'plain-yaml', 'secret-yaml'],
})
.option('owner', {
describe: 'Owner of the context',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const install = new Command({
name: argv.name,
repository: argv.repository,
version: argv.version,
values: argv.values,
values: argv.context,
tillerNamespace: argv.tillerNamespace,
});
console.log(`Started with id: ${workflowId}`);
Expand Down
1 change: 1 addition & 0 deletions lib/logic/api/helm.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const { getContextByName } = require('./context');

const SUPPORTED_TYPES = [
'plain-yaml',
'secret-yaml',
];


Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "codefresh",
"version": "0.5.8",
"version": "0.5.9",
"description": "Codefresh command line utility",
"main": "index.js",
"preferGlobal": true,
Expand All @@ -21,7 +21,6 @@
"scripts": "lib/**/*.js"
},
"dependencies": {
"firebase": "git+https://github.com/codefresh-io/firebase.git#80b2ed883ff281cd67b53bd0f6a0bbd6f330fed5",
"@codefresh-io/docker-reference": "^0.0.5",
"bluebird": "^3.5.1",
"cf-errors": "^0.1.11",
Expand All @@ -30,6 +29,7 @@
"columnify": "^1.5.4",
"debug": "^3.1.0",
"filesize": "^3.5.11",
"firebase": "git+https://github.com/codefresh-io/firebase.git#80b2ed883ff281cd67b53bd0f6a0bbd6f330fed5",
"js-yaml": "^3.10.0",
"jsonwebtoken": "^8.1.0",
"kefir": "^3.8.0",
Expand Down

0 comments on commit e910df1

Please sign in to comment.