Skip to content

Commit

Permalink
Rewrite example secret to use ksonnet-lib
Browse files Browse the repository at this point in the history
  • Loading branch information
anguslees committed Jun 8, 2017
1 parent e876966 commit 530a050
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions examples/secret.jsonnet
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
local kube = import "kube.libsonnet";

{
mysecret: kube.Secret("mysecret") {
data_: {
foo: "bar",
},
},
}
local k = import "ksonnet.beta.1/k.libsonnet";
local util = import "ksonnet.beta.1/util.libsonnet";

local secret = k.core.v1.secret;

local namespace = "default";

// Here is my super-secret data
local data = {foo: std.base64("sekret")};

secret.default("mysecret", namespace) +
secret.data(data)

0 comments on commit 530a050

Please sign in to comment.