sparse-intern-71089
06/24/2022, 10:28 AMmost-mouse-38002
06/24/2022, 10:28 AM_, err = yaml.NewConfigGroup(ctx, "flux-data-sync", &yaml.ConfigGroupArgs{
YAML: []string{result.Content},
SkipAwait: false,
}, pulumi.Provider(provider), pulumi.RetainOnDelete(true))
most-mouse-38002
06/24/2022, 10:38 AMbillowy-army-68599
retainOnDelete
only works for directly applied resources unfortunately, if you want this to happen I recommend using kube2pulumi
and directly creating the resourcesbillowy-army-68599
NewConfigGroup
is a COmponentResource so it operates a little differentlymost-mouse-38002
06/27/2022, 7:36 AMmost-mouse-38002
06/27/2022, 8:18 AMmost-mouse-38002
06/28/2022, 3:04 PMpulumi down
?billowy-army-68599
most-mouse-38002
06/28/2022, 3:13 PMmost-mouse-38002
06/28/2022, 3:29 PMbillowy-army-68599
most-mouse-38002
06/28/2022, 3:34 PMmost-mouse-38002
06/28/2022, 4:00 PMopts
I want are still not going to work with a component resource, thats too bad.billowy-army-68599
billowy-army-68599
most-mouse-38002
06/28/2022, 4:11 PMmost-mouse-38002
06/29/2022, 10:57 AMreturn func(args *pulumi.ResourceTransformationArgs) *pulumi.ResourceTransformationResult {
if args.Type == "kubernetes:core/v1:Namespace" ||
args.Type == "kubernetes:<http://apiextensions.k8s.io/v1:CustomResourceDefinition|apiextensions.k8s.io/v1:CustomResourceDefinition>" ||
args.Type == "kubernetes:core/v1:ServiceAccount" ||
args.Type == "kubernetes:<http://rbac.authorization.k8s.io/v1:ClusterRole|rbac.authorization.k8s.io/v1:ClusterRole>" ||
args.Type == "kubernetes:<http://rbac.authorization.k8s.io/v1:ClusterRoleBinding|rbac.authorization.k8s.io/v1:ClusterRoleBinding>" ||
args.Type == "kubernetes:core/v1:Service" ||
args.Type == "kubernetes:apps/v1:Deployment" ||
args.Type == "kubernetes:<http://networking.k8s.io/v1:NetworkPolicy|networking.k8s.io/v1:NetworkPolicy>" ||
args.Type == "kubernetes:<http://source.toolkit.fluxcd.io/v1beta2:GitRepository|source.toolkit.fluxcd.io/v1beta2:GitRepository>" ||
args.Type == "kubernetes:<http://kustomize.toolkit.fluxcd.io/v1beta2:Kustomization|kustomize.toolkit.fluxcd.io/v1beta2:Kustomization>" {
return &pulumi.ResourceTransformationResult{
Props: args.Props,
Opts: append(args.Opts, pulumi.RetainOnDelete(true), pulumi.DeleteBeforeReplace(false)),
}
}
return nil
}
billowy-army-68599
if
statementmost-mouse-38002
06/29/2022, 2:50 PMnot
expression for the two parents could suffice as well, but were unable to solve it any other way