Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable multiple instances of YAML manifests per stack #594

Merged
merged 6 commits into from
Jun 17, 2019

Conversation

lblackstone
Copy link
Member

@lblackstone lblackstone commented Jun 13, 2019

Fixes #536

With this fix, the following snippet produces this output:

new k8s.yaml.ConfigFile("guestbook",
    {
        file: "https://raw.githubusercontent.com/pulumi/pulumi-kubernetes/master/tests/examples/yaml-guestbook/yaml/guestbook.yaml",
        resourcePrefix: "prod",
    },
    {providers: {kubernetes: k8sProvider}}
);
new k8s.yaml.ConfigFile("guestbook",
    {
        file: "https://raw.githubusercontent.com/pulumi/pulumi-kubernetes/master/tests/examples/yaml-guestbook/yaml/guestbook.yaml",
        resourcePrefix: "local",
    }
);
     Type                                                        Name                         Plan
 +   pulumi:pulumi:Stack                                         gke-ingress-gke-ingress-dev  create
 +   ├─ kubernetes:yaml:ConfigFile                               prod-guestbook               create
 +   │  ├─ kubernetes:core:Service                               prod-frontend                create
 +   │  ├─ kubernetes:core:Service                               prod-redis-slave             create
 +   │  ├─ kubernetes:core:Service                               prod-redis-master            create
 +   │  ├─ kubernetes:apps:Deployment                            prod-redis-master            create
 +   │  ├─ kubernetes:apps:Deployment                            prod-frontend                create
 +   │  └─ kubernetes:apps:Deployment                            prod-redis-slave             create
 +   ├─ kubernetes:yaml:ConfigFile                               local-guestbook              create
 +   │  ├─ kubernetes:core:Service                               local-redis-slave            create
 +   │  ├─ kubernetes:core:Service                               local-frontend               create
 +   │  ├─ kubernetes:core:Service                               local-redis-master           create
 +   │  ├─ kubernetes:apps:Deployment                            local-redis-slave            create
 +   │  ├─ kubernetes:apps:Deployment                            local-redis-master           create
 +   │  └─ kubernetes:apps:Deployment                            local-frontend               create
 +   ├─ gcp:container:Cluster                                    gke-cluster                  create
 +   ├─ pulumi:providers:kubernetes                              gkeK8s                       create
 +   └─ kubernetes:rbac.authorization.k8s.io:ClusterRoleBinding  levi-cluster-admin           create

@lblackstone
Copy link
Member Author

lblackstone commented Jun 13, 2019

CI failing due to #591 #592. New test coverage passed.
Edit: Fixed CI.

Copy link
Contributor

@metral metral left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

pkg/gen/nodejs-templates/yaml.ts.mustache Show resolved Hide resolved
@lblackstone lblackstone force-pushed the lblackstone/disambiguate-yaml-names branch from 2caf5ee to 6fe2e00 Compare June 14, 2019 21:56
Allow users to disambiguate resources generated from a ConfigFile
using the optional `resourcePrefix` parameter. If set, the
generated resources will be prefixed with the provided string.
Allow users to disambiguate resources generated from a ConfigGroup
using the optional `resourcePrefix` parameter. If set, the
generated resources will be prefixed with the provided string.
@lblackstone lblackstone force-pushed the lblackstone/disambiguate-yaml-names branch from 6fe2e00 to f3b2809 Compare June 17, 2019 20:48
@lblackstone lblackstone merged commit b9d6a35 into master Jun 17, 2019
@pulumi-bot pulumi-bot deleted the lblackstone/disambiguate-yaml-names branch June 17, 2019 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't deploy same ConfigFile to multiple providers
2 participants