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
  • f

    flat-insurance-25294

    10/01/2020, 9:14 PM
    Because if that’s the case, it still needs to build it and compare final hashes in order to decide if something needs to be pushed or not. But the build aspect needs to happen - which makes it less idempotent, if something is changed upstream, maybe some dependency or whatever - obviously a dockerfile should be as idempotent as possible, but still room for errors, I am just figuring out how it works so I can make a better decision.
  • b

    broad-dog-22463

    10/01/2020, 9:15 PM
    It runs docker commands under the hood
  • f

    flat-insurance-25294

    10/01/2020, 9:15 PM
    It seems like @loud-battery-37784 was correct. It needs to do a form of “get or make” conditional.
  • f

    flat-insurance-25294

    10/01/2020, 9:16 PM
    @broad-dog-22463 To clarify, docker commands under the hood is building - but will Pulumi compare hashes before deciding to push to the registry/repository?
  • b

    broad-dog-22463

    10/01/2020, 9:17 PM
    Yes
  • b

    broad-dog-22463

    10/01/2020, 9:17 PM
    It will not update an image in the registry unless it has changed
  • b

    broad-dog-22463

    10/01/2020, 9:18 PM
    But if that image changes outside of Pulumi then Pulumi won’t know that without a Pulumi refres
  • b

    broad-dog-22463

    10/01/2020, 9:18 PM
    As it keeps track of the state
  • f

    flat-insurance-25294

    10/01/2020, 9:18 PM
    Let me clarify a bit further: The problem here is that the image used for a
    Deployment/Pod
    spec is computed from whatever Pulumi gives us as a result of its
    awsx/ECR
    API. It is not manually typed by us, we’re relying on the output of
    const image = buildAndPushImage(name: "app:23", pathOrBuild: "./app")
    To give consistent values so the only change is the
    replica
    count when Pulumi speaks with k8.
  • b

    broad-dog-22463

    10/01/2020, 9:18 PM
    I don’t know what further clarification you need here?
  • b

    broad-dog-22463

    10/01/2020, 9:19 PM
    We have examples of this in Pulumi/examples that you can test out and try it and see if changing the replicaCount does anything differently
  • b

    broad-dog-22463

    10/01/2020, 9:19 PM
    What do you need the experience to be?
  • b

    broad-dog-22463

    10/01/2020, 9:20 PM
    The output of that command is stable as long as it’s not a container that is changed outside of Pulumi’s control
  • f

    flat-insurance-25294

    10/01/2020, 9:27 PM
    Ok, I think I get it. You’re literally relying on Docker and nothing more - which is what I would expect (so 👍 )
  • b

    broad-dog-22463

    10/01/2020, 9:28 PM
    Yessir!
  • b

    broad-dog-22463

    10/01/2020, 9:28 PM
    If that specific thing isn’t working for you then it’s 100% a bug we need to fix
  • f

    flat-insurance-25294

    10/01/2020, 9:28 PM
    My issue was I couldn’t tell from the docs what the output of
    buildAndPushImage().image()
    does when it’s used in conjunction with
    awsx/kubernetes/EKS
    Inside a
    Deployment/Pod
    manifest for containers.
    spec: {
                    containers: [{
                        image, // **Use the image built above**
                    }],
    I know the string would be something like
    <http://012345678901.dkr.ecr.us-west-2.amazonaws.com/my-repo-e2fe830:latest|012345678901.dkr.ecr.us-west-2.amazonaws.com/my-repo-e2fe830:latest>
    Where parts of that is based on AWS meta-data like ID, region etc.
  • b

    broad-dog-22463

    10/01/2020, 9:29 PM
    Yeah that metadata is from the state
  • b

    broad-dog-22463

    10/01/2020, 9:29 PM
    :)
  • b

    broad-dog-22463

    10/01/2020, 9:29 PM
    It’s part of the inputs / outputs of the image resource
  • f

    flat-insurance-25294

    10/01/2020, 9:31 PM
    Right, the issue here is if replica count changes and the image is generated as:
    <http://amazonaws.com/my-repo-e2fe830:latest|amazonaws.com/my-repo-e2fe830:latest>
    each time. The newer pods will run a new image if Docker failed to understand that there is no need for a new “image push” - that’s not on Pulumi though. That can happen for loads of reasons, e.g poorly made Dockerfile, etc.
  • b

    broad-dog-22463

    10/01/2020, 9:32 PM
    Yeah :/ that’s the pitfalls of using latest I’m afraid - I always suggest using tag names specifically
  • f

    flat-insurance-25294

    10/01/2020, 9:32 PM
    Yep. It’s not an issue on master, but our staging and pr-environments.
  • f

    flat-insurance-25294

    10/01/2020, 9:33 PM
    Master has manually defined names (tags) from approved staging builds. But sometimes for a PR we want to test upping the replica count without redeploying a new image. Since we go through a CICD, it will build a new image, even though we just changed a replica count. I guess the real solution is using kubectl CLI to change just the replica count - that’s fine since we have access to pr environments via cli (not master or staging)
  • f

    flat-insurance-25294

    10/01/2020, 9:34 PM
    @broad-dog-22463 Thanks for explaining and being patient!
  • b

    broad-dog-22463

    10/01/2020, 9:36 PM
    Any time!
  • q

    quaint-electrician-41503

    10/02/2020, 6:37 PM
    Hello, I'm new to Pulumi but I have gotten beat down yesterday trying to deploy a helm chart. From the helm command I normally
    helm -f values.yaml name /path/to/chart
  • q

    quaint-electrician-41503

    10/02/2020, 6:38 PM
    I'd like to know how I can load a kubernetes yaml file and apply the configuration of
    values.yaml
    from
    LocalChartOpts
    . I found
    kubernetes.yaml
    but can't seem to get the proper values from E.G.
    ConfigFile
  • q

    quaint-electrician-41503

    10/02/2020, 6:41 PM
    I tried to for example set kubernetes config in a pulumi yaml file but due to the nested hierarchical yaml format I couldn't figure out how to load that configuration and try to apply via that route. Any pulumi kube experts in here that can help me reason about this, understand limitations, and sort this out?
  • b

    broad-dog-22463

    10/02/2020, 6:42 PM
    this may be of help on how to deploy a helm chart with Pulumi - https://github.com/pulumi/pulumi-kubernetes/blob/master/tests/sdk/nodejs/istio/step1/charts/istio-init/README.md
Powered by Linen
Title
b

broad-dog-22463

10/02/2020, 6:42 PM
this may be of help on how to deploy a helm chart with Pulumi - https://github.com/pulumi/pulumi-kubernetes/blob/master/tests/sdk/nodejs/istio/step1/charts/istio-init/README.md
View count: 4