No description
Find a file
2024-06-02 08:56:43 -07:00
bundle change label key to node-name 2023-02-17 03:37:33 -08:00
config Initial commit 2023-02-16 15:20:47 -08:00
controllers change label key to node-name 2023-02-17 03:37:33 -08:00
hack Initial commit 2023-02-16 15:20:47 -08:00
.dockerignore Initial commit 2023-02-16 15:20:47 -08:00
.gitignore Initial commit 2023-02-16 15:20:47 -08:00
bundle.Dockerfile Initial commit 2023-02-16 15:20:47 -08:00
Dockerfile general dependency updates for cves etc 2024-06-02 08:56:43 -07:00
go.mod general dependency updates for cves etc 2024-06-02 08:56:43 -07:00
go.sum general dependency updates for cves etc 2024-06-02 08:56:43 -07:00
main.go fix update issues 2024-03-22 18:39:25 -07:00
Makefile Update to go 1.20 and k8s 1.27 2023-07-14 16:09:17 -07:00
PROJECT Initial commit 2023-02-16 15:20:47 -08:00
README.md change label key to node-name 2023-02-17 03:37:33 -08:00
README_generated.md Initial commit 2023-02-16 15:20:47 -08:00

Operator that puts a pod's node name in the pod labels

I needed this and couldn't find it, so I made it. Most of the files here were generated by the operator-sdk program. The meat of the operator is in controllers/pod_controller.go.

Basically, if you annotate a pod with the annotation k8s.maxweiss.io/label-pod-node: "true" then the pod will magically get a label called "node-name" which matches the pod's spec.nodeName.

To build the docker image yourself, just run make docker-build.

To generate the Kubernetes resources in order to install this, go to the config/default directory and run kustomize build. Once you apply the output to your cluster, you're good to go.