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

Add Support for Exec-based Credential Plugin in Kustomization Provider #260

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

unitmatrix
Copy link

This pull request introduces support for an exec-based credential plugin in the Kustomization Terraform provider, enhancing its authentication capabilities. The key changes include:

  1. Provider Code Enhancement:
    The kustomize/provider.go file has been modified to incorporate the exec-based credential configuration. The provider now includes a new configuration block, exec, which supports executing an external command for credential retrieval. The required and optional parameters are handled within the provider's schema.

  2. Supporting Functionality:
    A new function, expandStringSlice, has been added to kustomize/structures.go to assist in processing command arguments. This function addresses a Terraform parser issue by converting nil elements in argument lists to empty strings.

  3. Unit Testing:
    Corresponding unit tests for expandStringSlice have been added in kustomize/structures_test.go. These tests ensure that the function correctly handles non-empty strings, nil elements, and empty arrays.

  4. Documentation Update:
    The documentation has been updated to include the new exec configuration block. This block allows users to specify an external command that can be executed to retrieve user credentials using the exec-based credential plugin. Parameters such as api_version, command, args, and env are detailed to guide users in configuring this feature.

These enhancements provide users with a more flexible authentication mechanism, allowing integration with custom credential providers. This update aligns the provider with modern Kubernetes practices, offering a robust solution for dynamic and secure credential management.

Refactor kubeconfig overrides and add expandStringSlice utility with tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant