aws-controllers-k8s / community

AWS Controllers for Kubernetes (ACK) is a project enabling you to manage AWS services from Kubernetes
https://aws-controllers-k8s.github.io/community/
Apache License 2.0
2.41k stars 254 forks source link

[Elasticache][ModifyCacheParameterGroup] Handle mandatory parameters in update #164

Closed nmvk closed 3 years ago

nmvk commented 4 years ago

Is your feature request related to a problem? Elasticache ModifyCacheParameterGroup API has two mandatory parameter parameter-name-values and cache-parameter-group-name. Customers create cache parameter group and use this API to modify individual parameters that are part of parameter group.

Generated code for this API

func (rm *resourceManager) newUpdateRequestPayload(
    r *resource,
) (*svcsdk.ModifyCacheParameterGroupInput, error) {
    res := &svcsdk.ModifyCacheParameterGroupInput{}

    if r.ko.Spec.CacheParameterGroupName != nil {
        res.SetCacheParameterGroupName(*r.ko.Spec.CacheParameterGroupName)
    }

    return res, nil
}

Generated code for ModifyCacheParameterGroup does not take this into account. Given that Modify API is constantly called from reconciler this results in InputError.

https://docs.aws.amazon.com/cli/latest/reference/elasticache/modify-cache-parameter-group.html

Describe the solution you'd like Ability to add custom logic around generated code?

Describe alternatives you've considered Describe and then invoke update (This would not work in many scenarios)

nmvk commented 4 years ago

Created new PR https://github.com/aws/aws-controllers-k8s/pull/243 to ensure InputError is not thrown. However we might still need this to modify individual parameter.

ack-bot commented 3 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with /close. Provide feedback via https://github.com/aws-controllers-k8s/community. /lifecycle stale

ack-bot commented 3 years ago

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with /close. Provide feedback via https://github.com/aws-controllers-k8s/community. /lifecycle rotten

ack-bot commented 3 years ago

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen. Provide feedback via https://github.com/aws-controllers-k8s/community. /close

ack-bot commented 3 years ago

@ack-bot: Closing this issue.

In response to [this](https://github.com/aws-controllers-k8s/community/issues/164#issuecomment-951432328): >Rotten issues close after 30d of inactivity. >Reopen the issue with `/reopen`. >Provide feedback via https://github.com/aws-controllers-k8s/community. >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.