aws-samples / eks-anywhere-addons

https://aws-samples.github.io/eks-anywhere-addons/
MIT No Attribution
21 stars 39 forks source link

Add the Pulumi Kubernetes Operator #141

Closed jkodroff closed 9 months ago

jkodroff commented 9 months ago

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

jkodroff commented 9 months ago

@elamaran11 Did my best to get the ExternalSecret right, but won't have time to test. It should should require a minor tweak at worst.

elamaran11 commented 9 months ago

@jkodroff Who will fix the above changes pointed by @EronWright. let me know when done i can test it.

EronWright commented 9 months ago

@elamaran11 Thanks for your patience, I encountered a small delay in pushing the changes, due to a permissions issue on the fork. I believe I've addressed the feedback; of course we'll discuss further once you can see them.

Meanwhile, here's the local test output (tested using EKS):

pulumi-k8s-operator-test-28254296-wd2c4 script 
pulumi-k8s-operator-test-28254296-wd2c4 script Writing out test manifest file '/tmp/pulumi-test-stack-1695257760-31679.yaml'
pulumi-k8s-operator-test-28254296-wd2c4 script 
pulumi-k8s-operator-test-28254296-wd2c4 script Deploying sample stack and program.
pulumi-k8s-operator-test-28254296-wd2c4 script program.pulumi.com/eks-pulumi-operator-test unchanged
pulumi-k8s-operator-test-28254296-wd2c4 script stack.pulumi.com/eks-pulumi-operator-test created
pulumi-k8s-operator-test-28254296-wd2c4 script 
pulumi-k8s-operator-test-28254296-wd2c4 script Waiting for the operator to deploy the stack.
pulumi-k8s-operator-test-28254296-wd2c4 script stack.pulumi.com/eks-pulumi-operator-test condition met
pulumi-k8s-operator-test-28254296-wd2c4 script 
pulumi-k8s-operator-test-28254296-wd2c4 script Verifying that the stack exists.
pulumi-k8s-operator-test-28254296-wd2c4 script {"orgName":"eron-pulumi-corp","projectName":"eks-pulumi-operator-test","stackName":"test-1695257760-31679","activeUpdate":"687b45a4-2d70-47b6-8031-3073fb35590e","tags":{"gitHub:owner":"eron-pulumi-corp","pulumi:project":"eks-pulumi-operator-test","pulumi:runtime":"yaml","pulumi:secrets_provider":"service"},"version":1}
pulumi-k8s-operator-test-28254296-wd2c4 script 
pulumi-k8s-operator-test-28254296-wd2c4 script Destroying K8s Stack resource
pulumi-k8s-operator-test-28254296-wd2c4 script stack.pulumi.com "eks-pulumi-operator-test" deleted
pulumi-k8s-operator-test-28254296-wd2c4 script 
pulumi-k8s-operator-test-28254296-wd2c4 script Waiting for the operator to remove the stack
pulumi-k8s-operator-test-28254296-wd2c4 script 
pulumi-k8s-operator-test-28254296-wd2c4 script Verifying the stack no longer exists
pulumi-k8s-operator-test-28254296-wd2c4 script 
pulumi-k8s-operator-test-28254296-wd2c4 script Deleting test manifest file '/tmp/pulumi-test-stack-1695257760-31679.yaml'
EronWright commented 9 months ago

@elamaran11 the changes have been pushed, please take another look.

elamaran11 commented 9 months ago

Hi @EronWright I see the stack is created and destroyed and test job concluded successfully. This is good news. I can say my test is concluded in EKS-A Baremetal environment. I will continue my tests in other environment. jc though, i dont see the stack in the Pulumi console is it because of instant create and delete?

❯ k logs pulumi-k8s-operator-test-002-df9kq -n pulumi                                                             ─╯

Writing out test manifest file '/tmp/pulumi-test-stack-1695303142-10787.yaml'

Deploying sample stack and program.
program.pulumi.com/eks-pulumi-operator-test unchanged
stack.pulumi.com/eks-pulumi-operator-test created

Waiting for the operator to deploy the stack.
stack.pulumi.com/eks-pulumi-operator-test condition met

Verifying that the stack exists.
{"orgName":"aws-partnership","projectName":"eks-pulumi-operator-test","stackName":"test-1695303142-10787","activeUpdate":"b9968d89-db2f-4634-b3c2-68a3da3f55a9","tags":{"gitHub:owner":"aws-partnership","pulumi:project":"eks-pulumi-operator-test","pulumi:runtime":"yaml","pulumi:secrets_provider":"service"},"version":1}

Destroying K8s Stack resource
stack.pulumi.com "eks-pulumi-operator-test" deleted

Waiting for the operator to remove the stack

Verifying the stack no longer exists

Deleting test manifest file '/tmp/pulumi-test-stack-1695303142-10787.yaml'
elamaran11 commented 9 months ago

@EronWright I got to understand its instant and also i saw the same in the console for quick few seconds. The product is validated across EKS-A BareMetal, vSphere and EKS Local cluster. EKS-A Snowball is still pending, i will complete this testing today or tomorrow when i get to the lab.