-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add content tabs in code examples in reference section (#3005)
Signed-off-by: vishalvivekm <[email protected]> Signed-off-by: Vivek Vishal <[email protected]>
- Loading branch information
1 parent
8e68e34
commit cf0c170
Showing
16 changed files
with
315 additions
and
277 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 |
---|---|---|
|
@@ -366,6 +366,7 @@ kustomize | |
kustomizeconfig | ||
kwi | ||
kwv | ||
kwds | ||
kyverno | ||
lastword | ||
Lato | ||
|
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
30 changes: 30 additions & 0 deletions
30
docs/docs/assets/crd/examples/configmap-for-deno-script.yaml
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,30 @@ | ||
apiVersion: lifecycle.keptn.sh/v1beta1 | ||
kind: KeptnTaskDefinition | ||
metadata: | ||
name: scheduled-deployment | ||
spec: | ||
function: | ||
configMapRef: | ||
name: scheduled-deployment-cm-1 | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: scheduled-deployment-1 | ||
data: | ||
code: | | ||
let text = Deno.env.get("DATA"); | ||
let data; | ||
if (text != "") { | ||
data = JSON.parse(text); | ||
} | ||
let targetDate = new Date(data.targetDate) | ||
let dateTime = new Date(); | ||
if(targetDate < dateTime) { | ||
console.log("Date has passed - ok"); | ||
Deno.exit(0); | ||
} else { | ||
console.log("It's too early - failing"); | ||
Deno.exit(1); | ||
} | ||
console.log(targetDate); |
8 changes: 8 additions & 0 deletions
8
docs/docs/assets/crd/examples/configmapref-for-deno-script.yaml
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,8 @@ | ||
apiVersion: lifecycle.keptn.sh/v1beta1 | ||
kind: KeptnTaskDefinition | ||
metadata: | ||
name: keptntaskdefinition-sample | ||
spec: | ||
deno: | ||
configMapRef: | ||
name: dev-configmap |
13 changes: 13 additions & 0 deletions
13
docs/docs/assets/crd/examples/functionref-for-deno-script.yaml
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,13 @@ | ||
apiVersion: lifecycle.keptn.sh/v1beta1 | ||
kind: KeptnTaskDefinition | ||
metadata: | ||
name: slack-notification-dev | ||
spec: | ||
deno: | ||
functionRef: | ||
name: slack-notification | ||
parameters: | ||
map: | ||
textMessage: "This is my configuration" | ||
secureParameters: | ||
secret: slack-token |
8 changes: 8 additions & 0 deletions
8
docs/docs/assets/crd/examples/httpref-script-for-deno-script.yaml
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,8 @@ | ||
apiVersion: lifecycle.keptn.sh/v1beta1 | ||
kind: KeptnTaskDefinition | ||
metadata: | ||
name: hello-keptn-http | ||
spec: | ||
deno: | ||
httpRef: | ||
url: "https://www.example.com/yourscript.js" |
15 changes: 15 additions & 0 deletions
15
docs/docs/assets/crd/examples/inline-script-for-deno-script.yaml
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,15 @@ | ||
apiVersion: lifecycle.keptn.sh/v1beta1 | ||
kind: KeptnTaskDefinition | ||
metadata: | ||
name: hello-keptn-inline | ||
spec: | ||
deno: | ||
inline: | ||
code: | | ||
let text = Deno.env.get("DATA"); | ||
let data; | ||
let name; | ||
data = JSON.parse(text); | ||
name = data.name | ||
console.log("Hello, " + name + " new"); |
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,10 @@ | ||
apiVersion: metrics.keptn.sh/v1alpha2 | ||
kind: KeptnMetricsProvider | ||
metadata: | ||
name: prometheus | dynatrace |dql | ||
namespace: <namespace> | ||
spec: | ||
targetServer: "<data-provider-url>" | ||
secretKeyRef: | ||
name: dt-api-token | ||
key: DT_TOKEN |
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,9 @@ | ||
apiVersion: lifecycle.keptn.sh/v?alpha? | ||
kind: KeptnTaskDefinition | ||
metadata: | ||
name: <task-name> | ||
spec: | | ||
deno | python | container | ||
... | ||
retries: <integer> | ||
timeout: <duration> |
9 changes: 9 additions & 0 deletions
9
docs/docs/assets/crd/examples/synopsis-for-container-runtime.yaml
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,9 @@ | ||
apiVersion: lifecycle.keptn.sh/v?alpha? | ||
kind: KeptnTaskDefinition | ||
metadata: | ||
name: <task-name> | ||
spec: | ||
container: | | ||
name: <container-name> | ||
image: <image-name> | ||
<other fields> |
12 changes: 12 additions & 0 deletions
12
docs/docs/assets/crd/examples/synopsis-for-deno-runtime-container.yaml
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,12 @@ | ||
apiVersion: lifecycle.keptn.sh/v?alpha? | ||
kind: KeptnTaskDefinition | ||
metadata: | ||
name: <task-name> | ||
spec: | ||
deno: | | ||
inline | httpRef | functionRef | ConfigMapRef | ||
parameters: | | ||
map: | ||
textMessage: "This is my configuration" | ||
secureParameters: | ||
secret: <secret-name> |
12 changes: 12 additions & 0 deletions
12
docs/docs/assets/crd/examples/synopsis-for-python-runtime-runner.yaml
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,12 @@ | ||
apiVersion: lifecycle.keptn.sh/v?alpha? | ||
kind: KeptnTaskDefinition | ||
metadata: | ||
name: <task-name> | ||
spec: | ||
python: | | ||
inline | httpRef | functionRef | ConfigMapRef | ||
parameters: | | ||
map: | ||
textMessage: "This is my configuration" | ||
secureParameters: | ||
secret: <secret-name> |
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,12 @@ | ||
apiVersion: metrics.keptn.sh/v1beta1 | ||
kind: KeptnMetricsProvider | ||
metadata: | ||
name: <data-source-instance-name> | ||
namespace: <namespace> | ||
spec: | ||
type: prometheus | dynatrace | dql | datadog | ||
targetServer: "<data-source-url>" | ||
secretKeyRef: | ||
name: <secret-name> | ||
key: <secret-key-that-holds-token> | ||
optional: true | false |
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
Oops, something went wrong.