Skip to content
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

Support objectAlias within KubernetesSecretObjectData #939

Closed
1 task done
a-bigelow opened this issue Mar 1, 2024 · 1 comment · Fixed by #941
Closed
1 task done

Support objectAlias within KubernetesSecretObjectData #939

a-bigelow opened this issue Mar 1, 2024 · 1 comment · Fixed by #941
Labels

Comments

@a-bigelow
Copy link
Contributor

Describe the feature

Support the objectAlias key for non-json secrets as well as json secrets via jmesPath, allowing for non-json secrets to be aliased to a new name.

Use Case

It's common to name SSM String Parameters by path, e.g. /rds/proxy/endpoint. If I want to pull those parameters in as kubernetes secrets via the blueprints' SecretProviderClass, I currently have to accept that they will end up being named _rds_proxy_endpoint when I mount them to my pod. The secrets store provider supports an objectAlias input that allows the secret to be renamed to something more palatable, e.g. RDS_PROXY_ENDPOINT.

Proposed Solution

Simply update KubernetesSecretObjectData to support the objectAlias key.

/**
 * Data for Kubernetes Secrets
 */
interface KubernetesSecretObjectData {

    /**
     * Name of the AWS Secret that is syncd
     */
    objectName?: string;

    /**
     * An alias for the resulting Kubernetes secret     
     */
    objectAlias?: string;
    
    /**
     * Kubernetes Secret Key
     */
    key?: string;
}

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request

CDK version used

2.115.0

EKS Blueprints Version

1.13.1

Node.js Version

Any

Environment details (OS name and version, etc.)

Any

@a-bigelow
Copy link
Contributor Author

Poking at this it looks like there's some more inheritance required than "Simply update KubernetesSecretObjectData to support the objectAlias key."

Will put a PR together

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant