-
Notifications
You must be signed in to change notification settings - Fork 521
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kubelet: enable credential provider support
This adds the capability to use Kubernetes image credential providers to retrieve credentials to use when pulling images for container creation. Initially we will only support the ecr-credential-provider, but things are set up so we may add more providers in future updates. Signed-off-by: Sean McGinnis <stmcg@amazon.com>
- Loading branch information
1 parent
a5a4135
commit c361847
Showing
19 changed files
with
147 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
apiVersion: kubelet.config.k8s.io/v1alpha1 | ||
kind: CredentialProviderConfig | ||
providers: | ||
{{#if settings.kubernetes.credential-providers}} | ||
{{#each settings.kubernetes.credential-providers}} | ||
{{#if this.enabled}} | ||
- name: {{@key}} | ||
matchImages: | ||
{{#each this.image-patterns}} | ||
- "{{this}}" | ||
{{/each}} | ||
defaultCacheDuration: "{{default "12h" this.cache-duration}}" | ||
apiVersion: credentialprovider.kubelet.k8s.io/v1alpha1 | ||
{{#if (eq @key "ecr-credential-provider")}} | ||
env: | ||
- name: HOME | ||
value: /root | ||
{{#if settings.aws.profile}} | ||
- name: AWS_PROFILE | ||
value: {{settings.aws.profile}} | ||
{{/if}} | ||
{{/if}} | ||
{{/if}} | ||
{{/each}} | ||
{{/if}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
apiVersion: kubelet.config.k8s.io/v1alpha1 | ||
kind: CredentialProviderConfig | ||
providers: | ||
{{#if settings.kubernetes.credential-providers}} | ||
{{#each settings.kubernetes.credential-providers}} | ||
{{#if this.enabled}} | ||
- name: {{@key}} | ||
matchImages: | ||
{{#each this.image-patterns}} | ||
- "{{this}}" | ||
{{/each}} | ||
defaultCacheDuration: "{{default "12h" this.cache-duration}}" | ||
apiVersion: credentialprovider.kubelet.k8s.io/v1alpha1 | ||
{{#if (eq @key "ecr-credential-provider")}} | ||
env: | ||
- name: HOME | ||
value: /root | ||
{{#if settings.aws.profile}} | ||
- name: AWS_PROFILE | ||
value: {{settings.aws.profile}} | ||
{{/if}} | ||
{{/if}} | ||
{{/if}} | ||
{{/each}} | ||
{{/if}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
apiVersion: kubelet.config.k8s.io/v1alpha1 | ||
kind: CredentialProviderConfig | ||
providers: | ||
{{#if settings.kubernetes.credential-providers}} | ||
{{#each settings.kubernetes.credential-providers}} | ||
{{#if this.enabled}} | ||
- name: {{@key}} | ||
matchImages: | ||
{{#each this.image-patterns}} | ||
- "{{this}}" | ||
{{/each}} | ||
defaultCacheDuration: "{{default "12h" this.cache-duration}}" | ||
apiVersion: credentialprovider.kubelet.k8s.io/v1alpha1 | ||
{{#if (eq @key "ecr-credential-provider")}} | ||
env: | ||
- name: HOME | ||
value: /root | ||
{{#if settings.aws.profile}} | ||
- name: AWS_PROFILE | ||
value: {{settings.aws.profile}} | ||
{{/if}} | ||
{{/if}} | ||
{{/if}} | ||
{{/each}} | ||
{{/if}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
apiVersion: kubelet.config.k8s.io/v1beta1 | ||
kind: CredentialProviderConfig | ||
providers: | ||
{{#if settings.kubernetes.credential-providers}} | ||
{{#each settings.kubernetes.credential-providers}} | ||
{{#if this.enabled}} | ||
- name: {{@key}} | ||
matchImages: | ||
{{#each this.image-patterns}} | ||
- "{{this}}" | ||
{{/each}} | ||
defaultCacheDuration: "{{default "12h" this.cache-duration}}" | ||
apiVersion: credentialprovider.kubelet.k8s.io/v1alpha1 | ||
{{#if (eq @key "ecr-credential-provider")}} | ||
env: | ||
- name: HOME | ||
value: /root | ||
{{#if settings.aws.profile}} | ||
- name: AWS_PROFILE | ||
value: {{settings.aws.profile}} | ||
{{/if}} | ||
{{/if}} | ||
{{/if}} | ||
{{/each}} | ||
{{/if}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters