https://pulumi.com logo
Docs
Join the conversationJoin Slack
Channels
announcements
automation-api
aws
azure
blog-posts
built-with-pulumi
cloudengineering
cloudengineering-support
content-share
contribex
contribute
docs
dotnet
finops
general
getting-started
gitlab
golang
google-cloud
hackathon-03-19-2020
hacktoberfest
install
java
jobs
kubernetes
learn-pulumi-events
linen
localstack
multi-language-hackathon
office-hours
oracle-cloud-infrastructure
plugin-framework
pulumi-cdk
pulumi-crosscode
pulumi-deployments
pulumi-kubernetes-operator
pulumi-service
pulumiverse
python
registry
status
testingtesting123
testingtesting321
typescript
welcome
workshops
yaml
Powered by Linen
kubernetes
  • m

    most-lighter-95902

    07/04/2022, 12:02 AM
    storage:
      # -- Sets the storage type. Supported values are sandbox, s3, gcs and custom.
      type: s3
      # -- bucketName defines the storage bucket flyte will use. Required for all types except for sandbox.
      bucketName: "{{ .Values.userSettings.bucketName }}"
      s3:
        region: "{{ .Values.userSettings.accountRegion }}"
  • m

    most-lighter-95902

    07/04/2022, 12:03 AM
    In the Pulumi Helm Release arguments:
  • m

    most-lighter-95902

    07/04/2022, 12:03 AM
    new k8s.helm.v3.Release(
          flyteHelmReleaseName,
          {
            name: flyteHelmReleaseName,
            namespace: flyteNsName,
            createNamespace: true,
            chart: 'flyte',
            version: 'v1.1.0-beta.5',
            repositoryOpts: {
              repo: '<https://helm.flyte.org>',
            },
            valueYamlFiles,
            values: {
              userSettings: {
                accountRegion: awsRegion,
                bucketName: flyteBucketName,
                ...
              }
            },
    ...
  • m

    most-lighter-95902

    07/04/2022, 12:04 AM
    Is this not supported? It looks like the values are not getting set properly for me
  • f

    famous-salesclerk-74711

    07/05/2022, 6:07 PM
    quick question - if we have an existing EKS cluster, what is the correct way for us to reference the associated oidc_provider?
    b
    • 2
    • 2
  • f

    famous-salesclerk-74711

    07/05/2022, 8:31 PM
    is there a way for
    pulumi_kubernetes
    resources to pull from a default eks_provider w/o explicitly passing one in in the
    ResourceOptions
    ? Kind of like how environment variables can auto-configure resources with the
    aws_provider
    ?
  • h

    helpful-morning-53046

    07/06/2022, 4:55 PM
    Hello all. I wonder if anyone can give some advice on the following. I am using the official Pulumi Amazon EKS package to create a K8s cluster. I used the Cluster.nodeGroupOptions input to set up the worker nodes but now need to upgrade the cluster version. In the past I would have done this by setting up a new node group in parallel with the old one and then migrating the workloads over. It seems I have shot myself in the foot by using
    nodeGroupOptions
    as I get an error
    Setting nodeGroupOptions, and any set of singular node group option(s) on the cluster, is mutually exclusive. Choose a single approach.
    when trying to spin up a NodeGroup (or ManagedNodeGroup) alongside the existing one. Does anyone have any advice as to how to perform a zero downtime worker node upgrade i.e. without having to tear them all down?
    b
    • 2
    • 3
  • i

    important-leather-28796

    07/06/2022, 6:16 PM
    It appears that Github has decided in the past few days to stop serving release assets. e.g.
    curl <https://github.com/cert-manager/cert-manager/releases/download/v1.8.2/cert-manager.yaml> -O
    is a zero byte file. Pulumi just started reporting this with a not-so-great error. Is there a workaround for this?
    error: TypeError: Cannot read properties of undefined (reading 'map')
            at /Users/kross/projects/archetype/node_modules/@pulumi/yaml/yaml.ts:2993:14
            at processTicksAndRejections (node:internal/process/task_queues:95:5)
    b
    • 2
    • 8
  • v

    victorious-exabyte-70545

    07/06/2022, 6:24 PM
    Hi all, I have some basic questions regarding ingress controllers and kubernetes. Thought I would ask here as I am implementing with Pulumi. When configuring a service (that will have an ingress routing to it), is it better to set it up as ClusterIP, NodePort, or LoadBalancer. If LoadBalancer, my cloud provider will launch a load balancer. It seems like I do not want this option as I will be paying for another load balancer (in addition to the one launched with the ingress controller). NodePort exposes the service on each node that hosts the pod right? And cluster ip uses an internal kube ip for internal workloads? I think maybe clusterip is the right choice? Thanks for the input!
    b
    • 2
    • 6
  • c

    crooked-laptop-67565

    07/06/2022, 7:51 PM
    Hi 👋 What's the best way to create a
    kubernetes.Provider
    for an EKS cluster? I have two Pulumi projects, one that sets up infra like k8s and databases, and a second one for apps that deploy to kubernetes and use the db etc... the app project needs to work with a kubernetes provider (eg when I define a
    Service
    ), like the one that's available from
    new eks.Cluster(...)
    . But the app code isn't doing the cluster creation, so it presumably needs to create that provider for itself. (I'm new to both Pulumi and k8s so please let me know if any part of what I said doesn't make sense or seems wrong).
    v
    • 2
    • 2
  • v

    victorious-exabyte-70545

    07/06/2022, 8:22 PM
    Hi guys, I want to update the spec of a service deployed with the pulumi chart resource. Any pointers on how to do this?
    b
    • 2
    • 7
  • m

    most-lighter-95902

    07/06/2022, 11:21 PM
    Hi does anyone know if I can use
    valueYamlFiles
    and
    values
    together where the
    valueYamlFiles
    yaml is referencing some values from
    values
    object using this kind of templating syntax:
    storage:
      type: s3
      bucketName: "{{ .Values.userSettings.bucketName }}"
  • m

    most-lighter-95902

    07/06/2022, 11:21 PM
    Where I provide the userSettings object as
    values
    key in the Pulumi helm release resource?
  • n

    narrow-translator-93508

    07/07/2022, 6:54 AM
    Hi, I have a tricky issue with
    Pulumi
    and
    helm
    , no problem to install
    ArgoCD
    but when I try to configure
    dex.config
    section, it expects a
    string
    rather than a
    map
    and when I pass a string it is not rendered with the right structure in the config map
  • n

    narrow-translator-93508

    07/07/2022, 6:55 AM
    _, err := helm.NewRelease(
    		a.Context, "argocd", &helm.ReleaseArgs{
    			Chart: pulumi.String("argo-cd"),
    			RepositoryOpts: helm.RepositoryOptsArgs{
    				Repo: pulumi.String("<https://argoproj.github.io/argo-helm>"),
    			},
    			Namespace: pulumi.String(a.Config.Require("namespace")),
    			Version:   pulumi.String(a.Config.Require("version")),
    			Values: pulumi.Map{
    				"dex": pulumi.Map{
    					"enabled": pulumi.Bool(true),
    				},
    				"server": pulumi.Map{
    					"config": pulumi.Map{
    						"dex.config": pulumi.Map{
    							"connectors": pulumi.MapArray{
    								pulumi.Map{
    									"config": pulumi.StringMap{
    										"issuer":       pulumi.String("<https://accounts.google.com>"),
    										"clientID":     a.Config.RequireSecret("client-id"),
    										"clientSecret": a.Config.RequireSecret("client-secret"),
    									},
    									"type": pulumi.String("oidc"),
    									"id":   pulumi.String("google"),
    									"name": pulumi.String("Google"),
    								},
    							},
    						},
    					},
    				},
    			},
    		},
    	)
  • n

    narrow-translator-93508

    07/07/2022, 6:55 AM
    When I pass a
    map
    it generates this error message
  • n

    narrow-translator-93508

    07/07/2022, 6:55 AM
    Diagnostics:
      kubernetes:<http://helm.sh/v3:Release|helm.sh/v3:Release> (argocd):
        error: error validating "": error validating data: ValidationError(ConfigMap.data.dex.config): invalid type for io.k8s.api.core.v1.ConfigMap.data: got "map", expected "string"
  • n

    narrow-translator-93508

    07/07/2022, 6:56 AM
    It happens here: https://github.com/argoproj/argo-helm/blob/main/charts/argo-cd/templates/_helpers.tpl#L241-L245
  • n

    narrow-translator-93508

    07/07/2022, 6:56 AM
    Any ideas/suggestions on how to fix that?
  • n

    narrow-translator-93508

    07/07/2022, 10:19 AM
    Fixed 🎉
  • n

    narrow-translator-93508

    07/07/2022, 10:19 AM
    Using this approach (in case it helps anyone with the same issue)
  • n

    narrow-translator-93508

    07/07/2022, 10:19 AM
    pulumi.All(
    		a.Config.RequireSecret("client-id"), a.Config.RequireSecret("client-secret"),
    	).ApplyT(
    		func(args []interface{}) error {
    			dex := &OIDCConfig{
    				Connectors: []*OIDCConnector{
    					{
    						Config: map[string]interface{}{
    							"issuer":       "<https://accounts.google.com>",
    							"clientID":     args[0].(string),
    							"clientSecret": args[1].(string),
    						},
    						Type: "oidc",
    						Name: "Google",
    						ID:   "google",
    					},
    				},
    			}
    			d, err := yaml.Marshal(&dex)
    			if err != nil {
    				return errors.Wrap(err, "SetupArgoCD: failed creating dex config")
    			}
    
    			_, err = helm.NewRelease(
    				a.Context, "argocd", &helm.ReleaseArgs{
    					Chart: pulumi.String("argo-cd"),
    					RepositoryOpts: helm.RepositoryOptsArgs{
    						Repo: pulumi.String("<https://argoproj.github.io/argo-helm>"),
    					},
    					Namespace: pulumi.String(a.Config.Require("namespace")),
    					Version:   pulumi.String(a.Config.Require("version")),
    					Values: pulumi.Map{
    						"dex": pulumi.Map{
    							"enabled": pulumi.Bool(true),
    						},
    						"server": pulumi.Map{
    							"config": pulumi.Map{
    								"dex.config": pulumi.String(d),
    							},
    						},
    					},
    				},
    			)
    			if err != nil {
    				return errors.Wrap(err, "SetupArgoCD: failed installing helm chart")
    			}
    
    			return nil
    		},
    	)
  • n

    narrow-translator-93508

    07/07/2022, 10:21 AM
    I think it would be nice to handle this in a future release, I mean
    map
    represented as
    string
  • c

    curved-morning-41391

    07/07/2022, 11:29 PM
    Hey anyone know a good way to mimic
    kubectl wait --for=condition=available --timeout=600s deployment/cert-manager-webhook -n cert-manager
    in pulumi?
  • g

    glamorous-australia-21342

    07/07/2022, 11:34 PM
    You could use the command resource
  • g

    glamorous-australia-21342

    07/07/2022, 11:35 PM
    https://www.pulumi.com/blog/improving-kubernetes-management-with-pulumis-await-logic/
  • g

    glamorous-australia-21342

    07/07/2022, 11:35 PM
    This too https://gist.github.com/lukehoban/fd0355ed5b82386bd89c0ffe2a3c916a
    🙌 1
    c
    c
    • 3
    • 4
  • c

    curved-morning-41391

    07/08/2022, 2:24 AM
    Okay one more, is there any way to get the cluster version from the provider?
  • g

    glamorous-australia-21342

    07/08/2022, 2:25 AM
    Platformversion if eks https://www.pulumi.com/registry/packages/aws/api-docs/eks/getcluster/#platformversion_nodejs. Google around the docs im sure the other providers have a version output.
  • c

    curved-morning-41391

    07/08/2022, 2:33 AM
    ah but its provider specific, anyway to get the equivalent of
    kubectl version
    ?
    b
    • 2
    • 4
Powered by Linen
Title
c

curved-morning-41391

07/08/2022, 2:33 AM
ah but its provider specific, anyway to get the equivalent of
kubectl version
?
b

billowy-army-68599

07/08/2022, 3:11 PM
kubectl version
just returns the server and client api version.
what is missing from the
platformVersion
output that you need?
c

curved-morning-41391

07/08/2022, 8:13 PM
So I was hoping to just understand the API version of the cluster regardless of provider, and install different versions of resources based on that
anyway to do that today?
View count: 6