curved-manchester-66006
08/09/2023, 4:21 PMFieldSet
matching work. I've created:
class MyGitopsHelmBundleTarget(Target):
alias = "my_gitops_helm_bundle"
core_fields = (
*(FrozenOrderedSet(HelmDeploymentTarget.core_fields) - {HelmDeploymentCreateNamespaceField}),
MyGitopsHelmBundleAppDirField,
MyGitopsHelmBundleContextField
)
@dataclass(frozen=True)
class MyGitopsHelmBundleFieldSet(FieldSet):
required_fields = (
HelmDeploymentDependenciesField,
HelmDeploymentSourcesField,
MyGitopsHelmBundleAppDirField,
MyGitopsHelmBundleContextField
)
# ... fields here
My expectation is that if I do pants experimental-deploy src/some_my_gitops_helm_bundle
then my plugin will do it's thing (will right now just log some warnings). Instead I'm seeing my the upstream helm backend and my plugin be invoked. This is confusing to me since the FieldSets have different required fields.
(For context my plugin is conceptually another way to handle a helm "deployment". Instead of exec-ing out to the helm
binary, I'm trying to make a tarball of the final yaml to pass off to an internal tool.)curved-manchester-66006
08/09/2023, 4:26 PMcurved-manchester-66006
08/09/2023, 4:54 PMHelmDeploymentDependenciesField
with my own Field which will prevent the match, but then I loose the helm dependency inference.broad-processor-92400
08/10/2023, 4:36 AMHelmDeploymentFieldSet
doesn't define an opt_out
override, so I think there's no way to stop it picking up any target that has both HelmDeploymentDependenciesField
and HelmDeploymentSourcesField
fields.
So one option might be to add (to upstream) a skip_deploy
field or something and an opt_out
method that checks it? I don't know if that's sensible, thoughbroad-processor-92400
08/10/2023, 4:38 AMopt_out
method added to the DeployFieldSet
ABC, so it's generically applicable?curved-manchester-66006
08/10/2023, 12:44 PM