brave-glass-88708
04/09/2020, 5:02 PM@pulumi/kubernetesx
and @pulumi/kubernetes
SDK for nodejs.
1. i know it can load a yaml manifest and deploy it - i take it that i can retrieve a remote file from a public source, customize it with some other configs and deploy it? since it's nodejs it should be possible 🙂
2. since most of these are third-party, they are provided as a helm chart or kustomize. with helm chart i see that pulumi has first-class support for it, for kustomize is it possible to achieve the same result as helm and providing custom overrides?fierce-dinner-20116
04/09/2020, 6:06 PMpulumi up
on a fresh checkout, i get the following errors:
~/dev/go/src/github.com/sourcegraph/deploy-k8s-helper master
❯ yarn
yarn install v1.22.4
warning package.json: No license field
warning sg-deploy-k8s-helper: No license field
[1/4] 🔍 Resolving packages...
success Already up-to-date.
✨ Done in 0.15s.
~/dev/go/src/github.com/sourcegraph/deploy-k8s-helper master
❯ pulumi up
Previewing update (dev):
Type Name Plan Info
pulumi:pulumi:Stack sourcegraph-deploy-kubernetes-helper-dev 3 messages
Diagnostics:
pulumi:pulumi:Stack (sourcegraph-deploy-kubernetes-helper-dev):
(node:95200) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 2)
(node:95200) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 3)
(node:95200) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 5)
salmon-army-25804
04/09/2020, 7:04 PMnew aws.s3.Bucket
with param website: { redirectAllRequestsTo: "<http://example.com|example.com>" }
. The s3 docs say that there is an option to specify protocol (I need to redirect with https
) but that does not seem possible in pulumi since redirectAllRequestsTo
is of type pulumi.Input<string>
. I additionally tried to specify routingRules: { Redirect: {HostName: "<http://example.com|example.com>",Protocol: "https"} }
to the same Bucket resource but then get the error message that aws:s3/bucket:Bucket resource 'mybucketname' has a problem: "website.0.redirect_all_requests_to": conflicts with website.0.routing_rules
. Additionally, if I go into the AWS web UI and manually update the Protocol field to "https" and then run pulumi up
, pulumi does not recognize that a change was made to the bucket configs which leads me to wonder if there is a bugfull-painter-18061
04/09/2020, 9:51 PMfamous-kite-69533
04/09/2020, 10:02 PMeager-cartoon-54068
04/09/2020, 11:04 PMaws.batch.ComputeEnvironment
, I have to specify computeEnvironmentName
and that exact name is used to deploy the resource. If I make any changes to the CE, I have to go in and change the name to avoid a conflict. Is there a way to get the suffix that Pulumi normally adds to resources so I don’t have to change the name every time I want to update an AWS Batch Compute Environment?quaint-jelly-95055
04/10/2020, 2:00 AMquaint-jelly-95055
04/10/2020, 2:01 AMquaint-jelly-95055
04/10/2020, 2:02 AM// Step 4: Create a Fargate service task that can scale out.
const appService = new awsx.ecs.FargateService("app-svc", {
cluster,
taskDefinitionArgs: {
container: {
image: img,
cpu: 102 /*10% of 1024*/,
memory: 50 /*MB*/,
portMappings: [{ containerPort: 8000, }],
},
},
desiredCount: 5,
});
shy-journalist-23327
04/10/2020, 4:18 AMacceptable-stone-35112
04/10/2020, 8:17 AMadorable-musician-66353
04/10/2020, 1:09 PMbrave-glass-88708
04/10/2020, 4:06 PMbrave-glass-88708
04/10/2020, 4:15 PMbright-orange-69401
04/10/2020, 4:16 PMcurl
my deployed website at the end of every deployment, and of course the URL is built from Pulumi variables... 🙂flaky-baker-91034
04/10/2020, 5:28 PM$ pulumi destroy
error: getting user info from <https://api.pulumi.com>: performing HTTP request: Get "<https://api.pulumi.com/api/user>": dial tcp 52.26.53.20:443: i/o timeout
worried-engineer-33884
04/10/2020, 5:46 PMcall
not being mocked as expected. Works fine on 11.x. Anyone else notice this?famous-translator-53768
04/10/2020, 6:56 PMgreen-morning-1318
04/10/2020, 7:13 PMworried-engineer-33884
04/10/2020, 7:53 PMfast-dinner-32080
04/10/2020, 9:36 PMrancher2:index/namespace:Namespace: (update)
[id=ua-dev]
[urn=urn:pulumi:stg-k8s-c01::k8s-cluster-projects::rancher2:index/namespace:Namespace::ns]
[provider=urn:pulumi:stg-k8s-c01::k8s-cluster-projects::pulumi:providers:rancher2::default_1_5_0::5ee76677-bc06-416a-a367-1be4dd7fa198]
~ labels: {
- <http://cattle.io/creator|cattle.io/creator> : "norman"
- <http://field.cattle.io/projectId|field.cattle.io/projectId>: "id"
}
and I have tried all these but doesn't seem to work. I am probably providing the string incorrect but I am having a hard time finding an example.
new CustomResourceOptions
{
IgnoreChanges =
{
{"labels.\"<http://cattle.io/creator|cattle.io/creator>\""}
}
}
new CustomResourceOptions
{
IgnoreChanges =
{
{"<http://labels.cattle.io/creator|labels.cattle.io/creator>"}
}
}
new CustomResourceOptions
{
IgnoreChanges =
{
{"labels[<http://cattle.io/creator|cattle.io/creator>]"}
}
}
new CustomResourceOptions
{
IgnoreChanges =
{
{"labels[\"<http://cattle.io/creator|cattle.io/creator>\"]"}
}
}
polite-motherboard-78438
04/11/2020, 2:59 PMpulumi preview
, I get the following diff:
+ ├─ kubernetes:<http://cert-manager.io:ClusterIssuer|cert-manager.io:ClusterIssuer> letsencrypt-prod create
- ├─ kubernetes:helm.sh:Chart letsencrypt-prod delete
- │ └─ kubernetes:<http://cert-manager.io:ClusterIssuer|cert-manager.io:ClusterIssuer> cert-maanger/letsencrypt-prod delete
The resource that Pulumi is trying to create is the same as the one it is trying to delete. (On K8s). I am not sure since when this happen, but It could be because the change the way the "lets-encrypt" resource is managed in Pulumi, from an Helm Chart to a Custom resource. Still
If I run pulumi up
it fails, saying with "error":
resource cert-maanger/letsencrypt-prod was not successfully created by the Kubernetes API server : <http://clusterissuers.cert-manager.io|clusterissuers.cert-manager.io> "letsencrypt-prod" already exists. That´s normal, since Pulumi is trying to create a resource that already exists.
So I am trying to converge the pulumi state with the K8s cluster state.
First I tried to manually delete the "letsencrypt" resource by it´s urn like so: pulumi state delete urn:pulumi:dev::brunopazdev::kubernetes:<http://helm.sh/v2/:letsencrypt-prod|helm.sh/v2/:letsencrypt-prod>
It gave an error: error:
This resource can't be safely deleted because the following resources depend on it: cert-maanger/letsencrypt-prod" (urn:pulumi:dev::brunopazdev::kubernetes:<http://helm.sh/v2:Chart$kubernetes:cert-manager.io/v1alpha2:ClusterIssuer::cert-maanger/letsencrypt-prod|helm.sh/v2:Chart$kubernetes:cert-manager.io/v1alpha2:ClusterIssuer::cert-maanger/letsencrypt-prod>)
Ok. makes sense. Let´s try to delete de dependent resource first:
pulumi state delete urn:pulumi:dev::brunopazdev::kubernetes:<http://helm.sh/v2:Chart$kubernetes:cert-manager.io/v1alpha2:ClusterIssuer::cert-maanger/letsencrypt-prod|helm.sh/v2:Chart$kubernetes:cert-manager.io/v1alpha2:ClusterIssuer::cert-maanger/letsencrypt-prod> --force -y
Another error: "*error: No such resource "urnpulumidev:brunopazdevkuberneteshelm.sh/v2:Chartert-manager.io/v1alpha2:ClusterIssuer::cert-maanger/letsencrypt-prod" exists in the current state*"
So I have a resource that depends on a resource that doesnt exist??
Has anybody have an idea how to fix this? Do I have to edit the state manually to remove this resources and then maybe importing the existing one from the Cluster state?
Thank you.swift-oxygen-28374
04/11/2020, 6:54 PMconst snapshot = new aws.ebs.Snapshot("Unattached volume", {
tags: {
Name: ebsVolume.tags["Name"],
Cleanup: "true",
Who: "satish",
When: "04102020"
},
volumeId: volumeId,
});
// const snapshotId = <http://snapshot.id|snapshot.id>.apply(s => `${s}`);
const snapshotId = pulumi.interpolate `prefix${<http://snapshot.id|snapshot.id>}suffix`
console.log("Created snapshot " + snapshotId + " for volume " + volumeId);
Created snapshot Calling [toString] on an [Output<T>] is not supported.
To get the value of an Output<T> as an Output<string> consider either:
1: o.apply(v => `prefix${v}suffix`)
2: pulumi.interpolate `prefix${v}suffix`
See <https://pulumi.io/help/outputs> for more details.
gorgeous-elephant-23271
04/11/2020, 8:38 PMpulumi new
I get Sorry, 'projectname' is not a valid project name. A project with this name already exists.
, and when I do pulumi stack init
I get error: no Pulumi project found in the current working directory
gorgeous-elephant-23271
04/11/2020, 8:39 PMpulumi.yaml
file into this folder, but when I ran pulumi stack init
it did nothing (though it created the stack on <http://app.pulumi.com|app.pulumi.com>
)gorgeous-elephant-23271
04/11/2020, 8:40 PMgorgeous-elephant-23271
04/11/2020, 8:40 PMv1.14.0
sparse-state-34229
04/12/2020, 7:37 AMsparse-state-34229
04/12/2020, 7:37 AMacceptable-stone-35112
04/12/2020, 8:35 AM