Resolve "Implement basic Kustomize functionality in k8s client to replace flux deployment script"
General MR
Summary
(Summarize the purpose of the MR)
Relevant logs/screenshots
Example output:
darrienlee@BAH:~/downloads/bbctl-app/bbctl$ make build
make building...
./scripts/build.sh
Build Time: "2025-07-07T15:22:21Z"
Build Directory: "/home/darrienlee/downloads/bbctl-app/bbctl"
building...
darrienlee@BAH:~/downloads/bbctl-app/bbctl$ export KUBECONFIG=~/.kube/Darrien.Lee-dev-default-config
darrienlee@BAH:~/downloads/bbctl-app/bbctl$ kubectl get pods -A
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system coredns-ccb96694c-cbkbp 1/1 Running 0 37m
kube-system local-path-provisioner-5cf85fd84d-wq2n4 1/1 Running 0 38m
metallb-system controller-5c7486f596-lxtdq 1/1 Running 0 38m
metallb-system speaker-7jfjh 1/1 Running 0 38m
metallb-system speaker-f7sd6 1/1 Running 0 38m
metallb-system speaker-psws5 1/1 Running 0 38m
metallb-system speaker-r6rvh 1/1 Running 0 38m
darrienlee@BAH:~/downloads/bbctl-app/bbctl$ kubectl get namespace
NAME STATUS AGE
default Active 68m
kube-node-lease Active 68m
kube-public Active 68m
kube-system Active 68m
metallb-system Active 68m
darrienlee@BAH:~/downloads/bbctl-app/bbctl$ ./bin/bbctl deploy flux
{"time":"2025-07-07T10:20:04.306018342-06:00","level":"DEBUG","msg":"Logger setup complete"}
{"time":"2025-07-07T10:20:04.306098944-06:00","level":"DEBUG","msg":"Command line settings: {\"addon\":[],\"all-charts\":false,\"audit\":false,\"bbctl-log-add-source\":false,\"bbctl-log-file\":\"\",\"bbctl-log-format\":\"json\",\"bbctl-log-level\":\"debug\",\"bbctl-log-output\":\"stdout\",\"bbctl-version\":\"1.3.0\",\"big-bang-credential-helper\":\"credentials-file\",\"big-bang-credential-helper-credentials-file-path\":\"/home/darrienlee/.bbctl/credentials.yaml\",\"big-bang-repo\":\"/home/darrienlee/.bbctl/bigbang/\",\"big-bang-skip-auto-update\":true,\"binary\":false,\"check-for-updates\":false,\"client\":false,\"credentials\":\"\",\"diff\":false,\"dry-run\":false,\"gatekeeper\":false,\"go-install\":false,\"gpg-key\":\"\",\"homebrew\":false,\"k3d\":false,\"kyverno\":false,\"namespace\":[],\"no-shas\":false,\"output\":\"$HOME/.bbctl/\",\"output-config\":{\"format\":\"text\",\"json-pretty-print\":true},\"profile\":\"\",\"registrypassword\":\"\",\"registryserver\":\"\",\"registryusername\":\"\",\"skip-update-check\":false,\"update-version\":\"\",\"values\":[]}"}
BBCTL UPGRADE AVAILABLE: Version 1.4.0 is available. Consider upgrading.
I0707 10:20:06.824799 7895 warnings.go:110] "Warning: would violate PodSecurity \"restricted:latest\": seccompProfile (pod or container \"manager\" must set securityContext.seccompProfile.type to \"RuntimeDefault\" or \"Localhost\")"
I0707 10:20:07.413990 7895 warnings.go:110] "Warning: would violate PodSecurity \"restricted:latest\": seccompProfile (pod or container \"manager\" must set securityContext.seccompProfile.type to \"RuntimeDefault\" or \"Localhost\")"
I0707 10:20:08.018900 7895 warnings.go:110] "Warning: would violate PodSecurity \"restricted:latest\": seccompProfile (pod or container \"manager\" must set securityContext.seccompProfile.type to \"RuntimeDefault\" or \"Localhost\")"
I0707 10:20:09.434588 7895 warnings.go:110] "Warning: would violate PodSecurity \"restricted:latest\": seccompProfile (pod or container \"manager\" must set securityContext.seccompProfile.type to \"RuntimeDefault\" or \"Localhost\")"
Registry URL: registry1.dso.mil
Registry Username: Lee_Darrien
Namespace: flux-system
Timeout: 5m0s
Flux Kustomization: /home/darrienlee/.bbctl/bigbang/base/flux
Flux Secret: private-registry
Flux Logs:
unable to get email address for: registry1.dso.mil
Ensuring flux-system namespace exists so that the docker-registry secret can be added first
namespace/flux-system configured
Checking if secret/private-registry exists
secret/private-registry does not exists
secret/private-registry created and deployed to namespace/flux-system
Building kustomization object from /home/darrienlee/.bbctl/bigbang/base/flux
Installing flux from kustomization object
Patched (SSA): Namespace flux-system
Patched (SSA): NetworkPolicy allow-egress
Patched (SSA): NetworkPolicy allow-scraping
Patched (SSA): NetworkPolicy allow-webhooks
Patched (SSA): ResourceQuota critical-pods-flux-system
Patched (SSA): ClusterRole crd-controller-flux-system
Patched (SSA): ClusterRole flux-edit-flux-system
Patched (SSA): ClusterRole flux-view-flux-system
Patched (SSA): ClusterRoleBinding cluster-reconciler-flux-system
Patched (SSA): ClusterRoleBinding crd-controller-flux-system
Patched (SSA): CustomResourceDefinition buckets.source.toolkit.fluxcd.io
Patched (SSA): CustomResourceDefinition gitrepositories.source.toolkit.fluxcd.io
Patched (SSA): CustomResourceDefinition helmcharts.source.toolkit.fluxcd.io
Patched (SSA): CustomResourceDefinition helmrepositories.source.toolkit.fluxcd.io
Patched (SSA): CustomResourceDefinition ocirepositories.source.toolkit.fluxcd.io
Patched (SSA): ServiceAccount source-controller
Patched (SSA): Service source-controller
Patched (SSA): Deployment source-controller
Patched (SSA): CustomResourceDefinition kustomizations.kustomize.toolkit.fluxcd.io
Patched (SSA): ServiceAccount kustomize-controller
Patched (SSA): Deployment kustomize-controller
Patched (SSA): CustomResourceDefinition helmreleases.helm.toolkit.fluxcd.io
Patched (SSA): ServiceAccount helm-controller
Patched (SSA): Deployment helm-controller
Patched (SSA): CustomResourceDefinition alerts.notification.toolkit.fluxcd.io
Patched (SSA): CustomResourceDefinition providers.notification.toolkit.fluxcd.io
Patched (SSA): CustomResourceDefinition receivers.notification.toolkit.fluxcd.io
Patched (SSA): ServiceAccount notification-controller
Patched (SSA): Service notification-controller
Patched (SSA): Service webhook-receiver
Patched (SSA): Deployment notification-controller
Verifying deployment controller: helm-controller
helm-controller condition met
Verifying deployment controller: source-controller
source-controller condition met
Verifying deployment controller: kustomize-controller
kustomize-controller condition met
Verifying deployment controller: notification-controller
notification-controller condition met
darrienlee@BAH:~/downloads/bbctl-app/bbctl$
darrienlee@BAH:~/downloads/bbctl-app/bbctl$ ./bin/bbctl deploy flux # output-config.format: json
{"time":"2025-07-07T10:21:52.413173348-06:00","level":"DEBUG","msg":"Logger setup complete"}
{"time":"2025-07-07T10:21:52.41324489-06:00","level":"DEBUG","msg":"Command line settings: {\"addon\":[],\"all-charts\":false,\"audit\":false,\"bbctl-log-add-source\":false,\"bbctl-log-file\":\"\",\"bbctl-log-format\":\"json\",\"bbctl-log-level\":\"debug\",\"bbctl-log-output\":\"stdout\",\"bbctl-version\":\"1.3.0\",\"big-bang-credential-helper\":\"credentials-file\",\"big-bang-credential-helper-credentials-file-path\":\"/home/darrienlee/.bbctl/credentials.yaml\",\"big-bang-repo\":\"/home/darrienlee/.bbctl/bigbang/\",\"big-bang-skip-auto-update\":true,\"binary\":false,\"check-for-updates\":false,\"client\":false,\"credentials\":\"\",\"diff\":false,\"dry-run\":false,\"gatekeeper\":false,\"go-install\":false,\"gpg-key\":\"\",\"homebrew\":false,\"k3d\":false,\"kyverno\":false,\"namespace\":[],\"no-shas\":false,\"output\":\"$HOME/.bbctl/\",\"output-config\":{\"format\":\"json\",\"json-pretty-print\":true},\"profile\":\"\",\"registrypassword\":\"\",\"registryserver\":\"\",\"registryusername\":\"\",\"skip-update-check\":false,\"update-version\":\"\",\"values\":[]}"}
BBCTL UPGRADE AVAILABLE: Version 1.4.0 is available. Consider upgrading.
I0707 10:21:54.925800 8902 warnings.go:110] "Warning: would violate PodSecurity \"restricted:latest\": seccompProfile (pod or container \"manager\" must set securityContext.seccompProfile.type to \"RuntimeDefault\" or \"Localhost\")"
I0707 10:21:55.524301 8902 warnings.go:110] "Warning: would violate PodSecurity \"restricted:latest\": seccompProfile (pod or container \"manager\" must set securityContext.seccompProfile.type to \"RuntimeDefault\" or \"Localhost\")"
I0707 10:21:56.126239 8902 warnings.go:110] "Warning: would violate PodSecurity \"restricted:latest\": seccompProfile (pod or container \"manager\" must set securityContext.seccompProfile.type to \"RuntimeDefault\" or \"Localhost\")"
I0707 10:21:57.525673 8902 warnings.go:110] "Warning: would violate PodSecurity \"restricted:latest\": seccompProfile (pod or container \"manager\" must set securityContext.seccompProfile.type to \"RuntimeDefault\" or \"Localhost\")"
{
"registryUrl": "registry1.dso.mil",
"registryUsername": "Lee_Darrien",
"namespace": "flux-system",
"timeout": "5m0s",
"fluxKustomization": "/home/darrienlee/.bbctl/bigbang/base/flux",
"fluxSecret": "private-registry",
"fluxLogs": [
"unable to get email address for: registry1.dso.mil",
"Ensuring flux-system namespace exists so that the docker-registry secret can be added first",
"namespace/flux-system configured",
"Checking if secret/private-registry exists",
"secret/private-registry does not exists",
"secret/private-registry created and deployed to namespace/flux-system",
"Building kustomization object from /home/darrienlee/.bbctl/bigbang/base/flux",
"Installing flux from kustomization object",
"Patched (SSA): Namespace flux-system",
"Patched (SSA): NetworkPolicy allow-egress",
"Patched (SSA): NetworkPolicy allow-scraping",
"Patched (SSA): NetworkPolicy allow-webhooks",
"Patched (SSA): ResourceQuota critical-pods-flux-system",
"Patched (SSA): ClusterRole crd-controller-flux-system",
"Patched (SSA): ClusterRole flux-edit-flux-system",
"Patched (SSA): ClusterRole flux-view-flux-system",
"Patched (SSA): ClusterRoleBinding cluster-reconciler-flux-system",
"Patched (SSA): ClusterRoleBinding crd-controller-flux-system",
"Patched (SSA): CustomResourceDefinition buckets.source.toolkit.fluxcd.io",
"Patched (SSA): CustomResourceDefinition gitrepositories.source.toolkit.fluxcd.io",
"Patched (SSA): CustomResourceDefinition helmcharts.source.toolkit.fluxcd.io",
"Patched (SSA): CustomResourceDefinition helmrepositories.source.toolkit.fluxcd.io",
"Patched (SSA): CustomResourceDefinition ocirepositories.source.toolkit.fluxcd.io",
"Patched (SSA): ServiceAccount source-controller",
"Patched (SSA): Service source-controller",
"Patched (SSA): Deployment source-controller",
"Patched (SSA): CustomResourceDefinition kustomizations.kustomize.toolkit.fluxcd.io",
"Patched (SSA): ServiceAccount kustomize-controller",
"Patched (SSA): Deployment kustomize-controller",
"Patched (SSA): CustomResourceDefinition helmreleases.helm.toolkit.fluxcd.io",
"Patched (SSA): ServiceAccount helm-controller",
"Patched (SSA): Deployment helm-controller",
"Patched (SSA): CustomResourceDefinition alerts.notification.toolkit.fluxcd.io",
"Patched (SSA): CustomResourceDefinition providers.notification.toolkit.fluxcd.io",
"Patched (SSA): CustomResourceDefinition receivers.notification.toolkit.fluxcd.io",
"Patched (SSA): ServiceAccount notification-controller",
"Patched (SSA): Service notification-controller",
"Patched (SSA): Service webhook-receiver",
"Patched (SSA): Deployment notification-controller",
"Verifying deployment controller: helm-controller",
"helm-controller condition met",
"Verifying deployment controller: source-controller",
"source-controller condition met",
"Verifying deployment controller: kustomize-controller",
"kustomize-controller condition met",
"Verifying deployment controller: notification-controller",
"notification-controller condition met"
]
}darrienlee@BAH:~/downloads/bbctl-app/bbctl$
darrienlee@BAH:~/downloads/bbctl-app/bbctl$ kubectl get pods -A
NAMESPACE NAME READY STATUS RESTARTS AGE
flux-system helm-controller-67f8c46b87-cr8f6 1/1 Running 0 43s
flux-system kustomize-controller-7847b97c9d-c848x 1/1 Running 0 43s
flux-system notification-controller-849645bf95-x7bxk 1/1 Running 0 41s
flux-system source-controller-54d8794d99-88kcb 1/1 Running 0 44s
kube-system coredns-ccb96694c-cbkbp 1/1 Running 0 73m
kube-system local-path-provisioner-5cf85fd84d-wq2n4 1/1 Running 0 74m
metallb-system controller-5c7486f596-lxtdq 1/1 Running 0 74m
metallb-system speaker-7jfjh 1/1 Running 0 74m
metallb-system speaker-f7sd6 1/1 Running 0 74m
metallb-system speaker-psws5 1/1 Running 0 74m
metallb-system speaker-r6rvh 1/1 Running 0 74m
darrienlee@BAH:~/downloads/bbctl-app/bbctl$ kubectl get namespace
NAME STATUS AGE
default Active 75m
flux-system Active 68s
kube-node-lease Active 75m
kube-public Active 75m
kube-system Active 75m
metallb-system Active 74m
darrienlee@BAH:~/downloads/bbctl-app/bbctl$
Linked Issue
Upgrade Notices
(Include any relevant notes about upgrades here or write "N/A" if there are none)
Closes #71 (closed)
Edited by Darrien Lee