kind-mechanic-53546
08/24/2020, 1:20 AMconst eventRouterServiceAccount = new k8s.core.v1.ServiceAccount(
"eventRouterServiceAccount",
{
apiVersion: "v1", // << Remove?
kind: "ServiceAccount", // << Remove?
metadata: {
name: "eventRouter",
namespace: "kube-system",
},
}
);
a) we already know we're creating a ServiceAccount
, b) we're specifying the version twice core.v1.
This is from kube2pulumirhythmic-napkin-82334
08/25/2020, 8:19 AMpulumi_kubernetes
on my mac when trying to `import pulumi_kubernetes`:
ModuleNotFoundError: No module named 'pulumi_kubernetes'
I installed pulumi with brew install pulumi
and additionally use a conda environment.
further information:
• pulumi v2.9.0
• see conda list
output in image attached
PS: pulumi up
with another script where I use only pulumi
and pulumi_aws
works fine!gorgeous-egg-16927
08/26/2020, 8:34 PMmany-psychiatrist-74327
08/26/2020, 11:33 PMConfigFile
.
I’m trying to deploy some existing k8s yaml objects with Pulumi/Python. I’m creating a k8s.yaml.ConfigFile
from my file as shown in this tutorial. However, the tutorial then suggests querying the resources inside the ConfigFile by calling `get_resource(type, name)`[0]. but that function doesn’t exist. Is there a way to “query” the resources inside the ConfigFile in Python?
[0] Code snippet:
guestbook = k8s.yaml.ConfigFile('guestbook', 'guestbook-all-in-one.yaml')
# Export the private cluster IP address of the frontend.
frontend = guestbook.get_resource('v1/Service', 'frontend') # <- fails
wet-noon-14291
08/27/2020, 11:37 AMpulumi up
when I have some ConfigFile
resources. I guess it is because I haven't "authenticated" against the cluster locally. How do I use ConfigFile
without logging in? Do I create ComponentResourceOptions
where I set the Provider
? How do I get the provider from a cluster?many-psychiatrist-74327
08/28/2020, 7:54 PMpulumi.export('ingress-address', ingress.status.load_balancer.ingress[0].hostname)
However, that fails (turns out that ingress.status
is {}
). However, the load balancer’s address shows just fine when running kubectl:
$ kubect get ingress -n test
NAME HOSTS ADDRESS PORTS AGE
ingress-main * <http://bdcc2d51-test-ingressmain-8b89-1677642024.us-east-2.elb.amazonaws.com|bdcc2d51-test-ingressmain-8b89-1677642024.us-east-2.elb.amazonaws.com> 80 10m
great-byte-67992
09/01/2020, 5:21 AMgorgeous-egg-16927
09/02/2020, 5:19 PMbetter-actor-92669
09/03/2020, 1:27 PMMaster version
1.17.9-gke.1503
The nature of the "Rapid Channel" is that it auto-upgrades the master version, and then a simple change in pulumi config works fine. Problems arise when you try to upgrade the node versions
panic: fatal: An assertion has failed: Expected diff to not require deletion or replacement during Update of urn:pulumi:smth-integration-1::smth-integration-1::gcp:container/cluster:Cluster::mixed-cluster-1
goroutine 144 [running]:
<http://github.com/pulumi/pulumi/sdk/v2/go/common/util/contract.failfast(...)|github.com/pulumi/pulumi/sdk/v2/go/common/util/contract.failfast(...)>
/home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v2@v2.9.1-0.20200825190708-910aa96016cd/go/common/util/contract/failfast.go:23
<http://github.com/pulumi/pulumi/sdk/v2/go/common/util/contract.Assertf(0xc000724300|github.com/pulumi/pulumi/sdk/v2/go/common/util/contract.Assertf(0xc000724300>, 0x3b887dd, 0x48, 0xc0012357a8, 0x1, 0x1)
/home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v2@v2.9.1-0.20200825190708-910aa96016cd/go/common/util/contract/assert.go:33 +0x197
<http://github.com/pulumi/pulumi-terraform-bridge/v2/pkg/tfbridge.(*Provider).Update(0xc0001ea000|github.com/pulumi/pulumi-terraform-bridge/v2/pkg/tfbridge.(*Provider).Update(0xc0001ea000>, 0x41492a0, 0xc001001dd0, 0xc000fd0d20, 0xc0001ea000, 0x3620a01, 0xc00101d500)
/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v2@v2.7.3/pkg/tfbridge/provider.go:971 +0x81d
<http://github.com/pulumi/pulumi/sdk/v2/proto/go._ResourceProvider_Update_Handler.func1(0x41492a0|github.com/pulumi/pulumi/sdk/v2/proto/go._ResourceProvider_Update_Handler.func1(0x41492a0>, 0xc001001dd0, 0x39f4e40, 0xc000fd0d20, 0x39f3540, 0x580a850, 0x41492a0, 0xc001001dd0)
/home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v2@v2.9.1-0.20200825190708-910aa96016cd/proto/go/provider.pb.go:1920 +0x89
<http://github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1(0x41492a0|github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1(0x41492a0>, 0xc001000210, 0x39f4e40, 0xc000fd0d20, 0xc000ffe640, 0xc000ffe660, 0x0, 0x0, 0x410c160, 0xc000210aa0)
/home/runner/go/pkg/mod/github.com/grpc-ecosystem/grpc-opentracing@v0.0.0-20180507213350-8e809c8a8645/go/otgrpc/server.go:57 +0x2eb
<http://github.com/pulumi/pulumi/sdk/v2/proto/go._ResourceProvider_Update_Handler(0x3a67500|github.com/pulumi/pulumi/sdk/v2/proto/go._ResourceProvider_Update_Handler(0x3a67500>, 0xc0001ea000, 0x41492a0, 0xc001000210, 0xc000f5f7a0, 0xc000b594a0, 0x41492a0, 0xc001000210, 0xc0006e7800, 0x3613)
/home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v2@v2.9.1-0.20200825190708-910aa96016cd/proto/go/provider.pb.go:1922 +0x14b
<http://google.golang.org/grpc.(*Server).processUnaryRPC(0xc0000e3dc0|google.golang.org/grpc.(*Server).processUnaryRPC(0xc0000e3dc0>, 0x4184520, 0xc000702c00, 0xc0013fcd00, 0xc000af1050, 0x57ca978, 0x0, 0x0, 0x0)
/home/runner/go/pkg/mod/google.golang.org/grpc@v1.30.0/server.go:1171 +0x50a
<http://google.golang.org/grpc.(*Server).handleStream(0xc0000e3dc0|google.golang.org/grpc.(*Server).handleStream(0xc0000e3dc0>, 0x4184520, 0xc000702c00, 0xc0013fcd00, 0x0)
/home/runner/go/pkg/mod/google.golang.org/grpc@v1.30.0/server.go:1494 +0xccd
<http://google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc000adbba0|google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc000adbba0>, 0xc0000e3dc0, 0x4184520, 0xc000702c00, 0xc0013fcd00)
/home/runner/go/pkg/mod/google.golang.org/grpc@v1.30.0/server.go:834 +0xa1
created by <http://google.golang.org/grpc.(*Server).serveStreams.func1|google.golang.org/grpc.(*Server).serveStreams.func1>
/home/runner/go/pkg/mod/google.golang.org/grpc@v1.30.0/server.go:832 +0x204
I use:
pulumi version ==> v2.9.2
Python Modules:
pulumi==2.9.2
pulumi-gcp==3.21.1
pulumi-kubernetes==2.5.0
pulumi-postgresql==2.3.0
pulumi-random==2.3.1
microscopic-car-16538
09/04/2020, 11:43 AMDeployment.Metadata.Name()
returns a pulumi.StringPtrOutput
and I don't have a clue about how to get a string back...
I guess it's pretty obvious but I can't see how to fix that...few-painting-77267
09/06/2020, 4:29 PMfew-painting-77267
09/07/2020, 8:06 AMfew-painting-77267
09/07/2020, 8:07 AMnew Secret("<>>", {
metadata: {
name: "<>",
namespace: "default"
},
stringData: {
auth: password.result.apply(p => {
let hash = crypto.createHash('md5');
hash.update(p);
return hash.digest('base64')
}).apply(p => `<>:${p}`)
}
})
few-painting-77267
09/07/2020, 8:07 AMeager-analyst-8893
09/07/2020, 2:21 PMconst istio = new k8s.yaml.ConfigFile("istio-1.7.yaml", {
file: "istio/istio-1.7.yaml",
}, {dependsOn: istioSystemNamespace, providers: {kubernetes: k8sProvider}, customTimeouts: {create: "10m"}});
But may be there is more beautiful way to install ?nutritious-flower-51098
09/08/2020, 1:48 PMconst argocd = new kubernetes.helm.v3.Chart("argo", {
repo: "argo",
chart: "argo-cd",
fetchOpts: {
repo: "<https://argoproj.github.io/argo-helm>",
},
namespace: argoNamespace.metadata.name,
}, {
provider: kubernetesProvider,
dependsOn: [argoNamespace]
})
limited-rainbow-51650
09/08/2020, 6:36 PMStatefulSet
? This is what I have so far:
attachPostgreSQLConfiguration(args: pulumi.ResourceTransformationArgs): pulumi.ResourceTransformationResult | undefined {
let props: pulumi.Input<kubernetes.types.input.apps.v1.StatefulSet> = args.props;
let env : kubernetes.types.input.core.v1.EnvVar[] = props.spec.template.spec.containers[0].env;
env = env.concat([
{
name: 'ORTHANC__POSTGRESQL__ENABLE_SSL',
value: 'true'
}
]);
<http://pulumi.log.info|pulumi.log.info>(`In psql plugin transformation: ${util.inspect(env)}`)
props.spec.template.spec.containers[0].env = env
return { props: props, opts: args.opts }
}
But I get a TypeScript error on props.spec
saying Object is possibly 'undefined'
limited-rainbow-51650
09/08/2020, 6:37 PMerror TS2339: Property 'template' does not exist on type 'Input<StatefulSetSpec>'
dazzling-sundown-39670
09/09/2020, 8:47 AMpulumi up
. I read somewhere that I should do a CronJob without a schedule but the typescript didn't like that. Any other suggestions?clever-byte-21551
09/09/2020, 5:28 PMp, err := providers.NewProvider(ctx, "kubernetes", &providers.ProviderArgs{
Kubeconfig: pulumi.StringPtr(k.kubeConfig),
})
if err != nil {
return errors.Wrap(err, "failed to create k8s provider")
}
_, err = helmv3.NewChart(ctx, "my-chart", helmv3.ChartArgs{
Path: pulumi.String(filepath.Join(chartsPath, "my-chart")),
Namespace: pulumi.String("some-ns"),
}, pulumi.Provider(p))
if err != nil {
return errors.Wrap(err, "failed to deploy chart")
}
I’m receiving this error:
failed to deploy k8s stack: failed to update stack: code: 0
, stdout: Updating (yarin/test-aws/k8s_us-west-2):
pulumi:pulumi:Stack: (same)
[urn=urn:pulumi:yarin/test-aws/k8s_us-west-2::test-aws::pulumi:pulumi:Stack::test-aws-yarin/test-aws/k8s_us-west-2]
+ pulumi:providers:kubernetes: (create)
[urn=urn:pulumi:yarin/test-aws/k8s_us-west-2::test-aws::pulumi:providers:kubernetes::kubernetes]
kubeconfig: \"CENSORED\"
+ 1 created
1 unchanged
Duration: 5s
, stderr: engine: 127.0.0.1:57240resmon: 127.0.0.1:57252error: expected '::' in provider reference ''
: failed to run update: failed to run inline program and shutdown gracefully: rpc error: code = Unavailable desc = transport is closing"
So I’m not sure what:
expected '::' in provider reference ''
supposed to meanworried-needle-99800
09/09/2020, 8:20 PMcrd2pulumi
, a CLI tool that generates typed CustomResources based on a k8s CRD, to a stand-alone repo at pulumi/crd2pulumi.
You can download the latest release here, which now supports Python and C#. Please reach out to me if you run into any bugs!kind-mechanic-53546
09/09/2020, 11:42 PMworried-ambulance-50217
09/10/2020, 12:23 AMlimited-rainbow-51650
09/11/2020, 2:38 PMpulumi
is hanging/waiting during a preview
(or the preview part of up
)? This started happening since I deployed cert-manager
v0.16.1 on a k8s 1.15 cluster.clever-byte-21551
09/14/2020, 7:36 AMhundreds-receptionist-31352
09/14/2020, 3:38 PMfaint-motherboard-95438
09/15/2020, 2:44 PMabundant-airplane-93796
09/17/2020, 1:08 AMistio-ingressgateway
service as a resource so that I can extract the value of some annotations to use in some later resourcescreamy-forest-42826
09/17/2020, 11:54 AMpulumi.all(...).apply(...)
for (let i = 0; i < args.containerConf.replicas; i++) {
const service = new k8s.core.v1.Service(
`zooservice-${i}`,
{
metadata: {
name: `zooservice-${i}`,
labels: {
app: ZookeeperApp,
},
},
spec: {
ports: [
{ port: 2181, name: "client" },
{ port: 2888, name: "server" },
{ port: 3888, name: "leader-election" },
],
},
},
{
parent: this,
}
);
this.zkServices.push(service);
}
const inputIPs = this.getZookeeperServicesIPs();
pulumi.all(inputIPs).apply((servicesIPs) => {
servicesIPs.forEach((ip) => {
console.log(ip);
});
for (let i = 0; i < args.containerConf.replicas; i++) {
const zookeeper = new Zookeeper(
`zookeeper-${i}`,
{
containerConf: args.containerConf,
imagePullSecrets: args.imagePullSecrets,
serviceIPs: servicesIPs,
},
{
parent: this,
}
);
this.zookeepers.push(zookeeper);
}
});
PS: I cannot use DNS names.dazzling-sundown-39670
09/17/2020, 2:11 PMpulumi up
it takes down all my cluster nodes and starts them again because of a new template body. Can I avoid this? This time I didn't even change anything related to the clusterdazzling-sundown-39670
09/17/2020, 2:11 PMpulumi up
it takes down all my cluster nodes and starts them again because of a new template body. Can I avoid this? This time I didn't even change anything related to the clustersteep-angle-29984
09/17/2020, 2:21 PMdazzling-sundown-39670
09/18/2020, 7:28 AM