-
Notifications
You must be signed in to change notification settings - Fork 275
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(pulumi): enable new varfile schema for modules (#6735)
feat(pulumi): nable new varfile schema for modules
- Loading branch information
Showing
12 changed files
with
2,410 additions
and
25 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
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
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
8 changes: 8 additions & 0 deletions
8
plugins/pulumi/test/test-project-k8s/k8s-namespace-new-module/Pulumi.local.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 @@ | ||
config: | ||
pulumi-k8s-test:namespace: pulumi-test | ||
pulumi-k8s-test:appName: app-name-from-pulumi-varfile | ||
pulumi-k8s-test:orgName: foobar123 | ||
pulumi-k8s-test:isMinikube: 'true' | ||
backend: | ||
url: https://api.pulumi.com | ||
test: foo |
3 changes: 3 additions & 0 deletions
3
plugins/pulumi/test/test-project-k8s/k8s-namespace-new-module/Pulumi.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,3 @@ | ||
name: pulumi-k8s-test | ||
runtime: nodejs | ||
description: A minimal Kubernetes TypeScript Pulumi program |
15 changes: 15 additions & 0 deletions
15
plugins/pulumi/test/test-project-k8s/k8s-namespace-new-module/garden.yml
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 @@ | ||
kind: Module | ||
type: pulumi | ||
name: k8s-namespace-new-module | ||
description: Creates a Namespace | ||
useNewPulumiVarfileSchema: true | ||
pulumiVarfiles: [varfile-new-schema.yaml] | ||
createStack: true | ||
cacheStatus: true | ||
allowDestroy: true | ||
pulumiVariables: | ||
pulumi-k8s-test:orgName: ${var.orgName} | ||
pulumi-k8s-test:namespace: pulumi-test | ||
pulumi-k8s-test:isMinikube: "true" | ||
|
||
|
19 changes: 19 additions & 0 deletions
19
plugins/pulumi/test/test-project-k8s/k8s-namespace-new-module/index.ts
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,19 @@ | ||
/* | ||
* Copyright (C) 2018-2024 Garden Technologies, Inc. <info@garden.io> | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
import * as pulumi from "@pulumi/pulumi" | ||
import * as k8s from "@pulumi/kubernetes" | ||
|
||
// Minikube does not implement services of type `LoadBalancer`; require the user to specify if we're | ||
// running on minikube, and if so, create only services of type ClusterIP. | ||
const config = new pulumi.Config() | ||
|
||
const name = config.require("namespace") | ||
|
||
const ns = new k8s.core.v1.Namespace(config.require("namespace"), { metadata: { name } }) | ||
export const namespace = ns.metadata.name |
Oops, something went wrong.