Hello, I wanted to ask if your team has considered...
# atmos
b
Hello, I wanted to ask if your team has considered implementing an Atmos Controller for Kubernetes similar to the AWS Controller for Kubernetes. For my team specifically, it would help us bridge the gap between our shared/base infra deployed and managed by atmos, and then having ArgoCD pick up our app helm charts and having a controller that can deploy app specific resources that live and die by the application’s lifecycle. The AWS controller does this, kinda, but it would be nice to have the end-to-end managed by atmos
e
We have given it some thought
I think @Nick Dunn nerd sniped me ~6 mo ago
Would you be interested in codeveloping something like this?
n
I know I’m still interested in this feature and I’d be willing to help with development. There are other options out there, but I’m not fond of them for various reasons. • The tofu-controller has too many rough edges for my liking. • The Pulumi controller is pretty interesting, but while I like Pulumi I don’t see us moving to it. • Crossplane is immensely powerful, but it takes a very long time to spin up the average engineer on how it all works and it once again has some rough edges. Our platform team is simply too small to justify this. • Kro + ACK is probably the most promising solution for us. We have been experimenting with it. It also has some rough edges, though I have a feeling those will be worked out in time considering AWS is behind it. Still, that only handles AWS resources. I agree with @Brandon - I would much rather continue to use Atmos as it has become pretty critical to how we work everywhere else. We’re big fans. simple smile I think most of my Go experience is writing small CLI tools, small K8s operators long ago, and some Terraform provider hacking/tinkering. But I’d be willing to help where I can.
e
Yea, I think KRO+ACK+Atmos = the future!
n
Huh. Now I never considered Atmos integrating with KRO & ACK. I was always mostly thinking about Terraform execution. But that would actually be very interesting…and it aligns with the new moves towards Kubernetes manifest management.
e
There will always be glue required. Atmos is that glue.
Even if you use only KRO+ACK, how does it get to kubernetes or argocd?
…`atmos kubernetes` or
atmos helm
with git targets or direct CD
n
Generally speaking, our use so far is limited in scope. Perhaps unsurprisingly, we use Atmos + Terraform to build the basic building blocks up to an EKS cluster. Once the EKS cluster is up, we bootstrap ArgoCD (currently Terraform Helm, but we’re trying to change that). Then we bootstrap a couple of ArgoCD apps (app-of-apps), one of which points to another repository dedicated to K8s manifests (Kustomize). This other repository defines KRO/ACK manifests.
We also have “on-demand” development environments that provide a way to emulate a production environment. In which case, we have a K8s cluster dedicated to acting as a sort of control plane. Once again, the control plane is built by Atmos + Terraform and ArgoCD is bootstrapped. After that point, you can build additional infrastructure by submitting new manifests (e.g. ACK) to a specific repository.
All experimental. No production environments are involved, here.
e
Btw, do you use backstage?
n
At previous employers, yes. Currently, no. We are considering it for our roadmap going forward, though.
b
We’re using Backstage. similar to Nick, we have a hub running ArgoCD that talks to our workload cluster to spin apps up via ApplicationSets. Our “infra” repos build all the shared resources, VPC, DNS, ACM certs, etc up to the EKS workload cluster including IAM permissions to link the cluster back up to the hub. ArgoCD chews through some ApplicationSet generators and any app repos get picked up by a github topic on the app repo. Inside the app repo we have a helm folder with everything need to run the app including anything we need ACK to provision, security groups, IAM roles/policies, etc
e
@Brandon LMK if that operator design in the PRD would solve your needs
b
I’m reading over it but I have a 1hr commute coming up, so it’ll be a bit before I can sync back
👍 2
e
@Brandon did you get the chance to review?
b
I did, and it looks promising, but there’s a few rough edges I’d need to work out: 1. Ordering with ArgoCD: we need the operator to reconcile before the Application sync and fail the sync if the reconcile fails. That likely means standard status conditions plus a health check ArgoCD can gate sync waves on. The health also needs to reflect the revision ArgoCD just synced, not a stale Ready from the previous commit. 2. Approvals vs. self-heal: approving by patching approvePlan on the live CR is drift from git, so ArgoCD’s self-heal would revert it. We’d want the plan shown on the PR, with the merge acting as the approval. The catch is that the post-merge plan has to match what was reviewed; if it doesn’t, the operator should hold instead of applying.
e
Cool will reconcile that with the PRD and see what would make sense
n
On #2, I’d say you could have ArgoCD ignore differences as-needed and then have a different process for approving Atmos runs, which are arguably somewhat separate from the CR representation. I think another option would be to allow it to auto approve ‘applies’. You could theoretically leverage this semi-safely by using the branch planner as described. I think this is theoretically the idea with the tofu-controller, as well. I hadn’t considered it before, but I think the Atmos deploy command might prove extremely valuable there in conjunction with planfile storage. • PR is created. Atmos controller runs a plan-only run with branch planner. • PR is approved and merged. • Atmos controller automatically runs deploy and auto-approved…_assuming_ it matches the stored plan. Regardless, I agree there are some rough edges. Though to be fair, I’d expect some considering we’re discussing the ‘free’ version.
e
If we were to come out with a pilot operator do you have a cluster where you’d be able to safely test?
n
Yes. I have an isolated one in mind, too, so I could probably record or share much of the experience.
b
I have one as well
e
Sweet - was just talking about this again today.
Will probably burn some tokens on this soon.