-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enh: support direct updates #2335
Conversation
Signed-off-by: Alex Pana <[email protected]>
@@ -197,6 +208,7 @@ func (a *Adapter) Update(ctx context.Context, u *unstructured.Unstructured) erro | |||
return fmt.Errorf("converting DataformRepository spec to api: %w", mapCtx.Err()) | |||
} | |||
|
|||
resource.Name = a.fullyQualifiedName() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this could be part of the controller template
pkg/test/resourcefixture/testdata/basic/dataform/v1alpha1/dataformrepository/update.yaml
Outdated
Show resolved
Hide resolved
Signed-off-by: Alex Pana <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For full test suite, can you include all the configurable fields in the create.yaml? i.e. npmrcEnvironmentVariablesSecretVersion (unless it is not supported by the tf-based alpha)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, those fields are not supported yet. Those are coming as part of https://github.com/GoogleCloudPlatform/k8s-config-connector/pull/2338/files ; as I work on that PR I will update the test suite on it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could add gitRemoteSettings here, I think. But we can do that in another PR
@@ -188,7 +189,17 @@ func (a *Adapter) Create(ctx context.Context, u *unstructured.Unstructured) erro | |||
func (a *Adapter) Update(ctx context.Context, u *unstructured.Unstructured) error { | |||
|
|||
updateMask := &fieldmaskpb.FieldMask{} | |||
// TODO(acpana): handle updates | |||
|
|||
if a.desired.Spec.GitRemoteSettings != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somewhere (maybe in an open PR) we have a helper to compute these, assuming we want the top-level fields.
Not a blocker
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could add gitRemoteSettings here, I think. But we can do that in another PR
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: justinsb The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Adds update support for
DataformRepository
still in alpha!