https://pulumi.com logo
#kubernetes
Title
# kubernetes
b

better-dentist-3207

06/04/2023, 12:50 AM
Is there any way to remove the
/managed-by: pulumi
label from all resulting manifests? I'm using a pulumi project solely to generate yamls to feed into argocd, label is semantically incorrect in my context.
b

billowy-army-68599

06/04/2023, 5:02 PM
b

better-dentist-3207

06/04/2023, 5:03 PM
Tried it but does not work, transformations seem to work for other labels but
managed-by: pulumi
seems to be specially treated by pulumi
wait, I tried transformations inside
ConfigFile
docs, but haven't tried them on resource level, let me check
m

many-telephone-49025

06/12/2023, 6:54 PM
@better-dentist-3207: are you using
renderYamlToDirectory
to generate the yaml files?
b

better-dentist-3207

06/14/2023, 6:06 AM
yes
If I set this up right I'm planning to write an ArgoCD Plugin to just use the generated files with specific directory patterns through ArgoCD
m

many-telephone-49025

06/14/2023, 7:35 AM
then activate SSA too in the provider and you should not get the managed-by
b

better-dentist-3207

06/14/2023, 7:38 AM
Do those two options not conflict with each other? Asking because this pulumi project needs to work fully offline, even if a valid
.kube/config
is detected.
m

many-telephone-49025

06/14/2023, 7:40 AM
i did a similar thing for a workshop with Flux, but rendered to a S3 bucket to pick up: civo-navigate-gitops/gitops/baseconfig.ts
b

better-dentist-3207

06/14/2023, 7:42 AM
That's a great repo, thanks!
This structure seems really similar to what I'm currently doing. Abstract
pulumi.ComponentResource
as something like
ArgoCdApplication
with a built in k8s provider, and have people extend that. Then all
ArgoCdApplication
instances get passed to a
Bootstrap
ComponentResource instance which creates actual ArgoCD Custom Resources
One issue I haven't solved yet is because everything is in a single pulumi project, the argocd plugin has to render every app for each time it needs to extract a single app.
m

many-telephone-49025

06/14/2023, 7:56 AM
Split the Pulumi project into separate ones?
b

better-dentist-3207

06/14/2023, 8:02 AM
Can do that, but I'm trying to keep this solution as stateless as possible for just generating manifests. Generated ArgoCD
kind: Application
Custom resources are dependent on the names of the ComponentResources. If I start introducing state with stack references, things start getting janky on the side of the ArgoCD Plugin
m

many-telephone-49025

06/14/2023, 8:04 AM
valid point!