forked from helm/charts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[stable/aws-iam-authenticator] Add new chart (helm#10940)
Signed-off-by: Andrew Plummer <[email protected]>
- Loading branch information
1 parent
65a1c9e
commit 5586b43
Showing
7 changed files
with
191 additions
and
0 deletions.
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,21 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj |
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,11 @@ | ||
apiVersion: v1 | ||
appVersion: "1.0" | ||
description: A Helm chart for aws-iam-authenticator | ||
name: aws-iam-authenticator | ||
version: 0.1.0 | ||
home: https://github.com/kubernetes-sigs/aws-iam-authenticator | ||
maintainers: | ||
- name: plumdog | ||
email: [email protected] | ||
sources: | ||
- https://github.com/kubernetes-sigs/aws-iam-authenticator |
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,36 @@ | ||
# AWS IAM Authenticator | ||
|
||
See https://github.com/kubernetes-sigs/aws-iam-authenticator | ||
|
||
In particular, make sure that have configured your API server as in | ||
https://github.com/kubernetes-sigs/aws-iam-authenticator#how-do-i-use-it. (This | ||
chart only installs the DaemonSet and a ConfigMap.) | ||
|
||
## Values | ||
|
||
| Config | Description | Default | | ||
| `image.repository` | Image repo | `gcr.io/heptio-images/authenticator` | | ||
| `image.tag` | Image tag | `v0.1.0` | | ||
| `image.pullPolicy` | Image pull policy | `IfNotPresent` | | ||
| `config` | All the config, see below | `{}` | | ||
| `resources` | Pod resources | `{}` | | ||
| `hostPathConfig.output` | HostPath output | `/srv/kubernetes/aws-iam-authenticator/` | | ||
| `hostPathConfig.state` | HostPath state | `/srv/kubernetes/aws-iam-authenticator/` | | ||
|
||
### Config | ||
|
||
The value set for `config` is where all the action happens - this is | ||
how you map AWS IAM roles to groups in the cluster. See the | ||
aws-iam-authenticator docs for all of the possible options for this. | ||
|
||
A simple example values file might look like: | ||
``` | ||
config: | ||
clusterID: mycluster.io | ||
server: | ||
mapRoles: | ||
- groups: | ||
- developers # the name of a group within Kubernetes | ||
roleARN: arn:aws:iam::000000000000:role/developer # the ARN of a role in AWS | ||
username: developer | ||
``` |
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,32 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "aws-iam-authenticator.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
If release name contains chart name it will be used as a full name. | ||
*/}} | ||
{{- define "aws-iam-authenticator.fullname" -}} | ||
{{- if .Values.fullnameOverride -}} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- else -}} | ||
{{- $name := default .Chart.Name .Values.nameOverride -}} | ||
{{- if contains $name .Release.Name -}} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}} | ||
{{- else -}} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "aws-iam-authenticator.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} |
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,12 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ template "aws-iam-authenticator.fullname" . }} | ||
labels: | ||
app: {{ template "aws-iam-authenticator.name" . }} | ||
chart: {{ template "aws-iam-authenticator.chart" . }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
data: | ||
config.yaml: | | ||
{{ toYaml .Values.config | indent 4 }} |
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,67 @@ | ||
apiVersion: extensions/v1beta1 | ||
kind: DaemonSet | ||
metadata: | ||
name: {{ template "aws-iam-authenticator.fullname" . }} | ||
labels: | ||
app: {{ template "aws-iam-authenticator.name" . }} | ||
chart: {{ template "aws-iam-authenticator.chart" . }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
spec: | ||
updateStrategy: | ||
type: RollingUpdate | ||
template: | ||
metadata: | ||
annotations: | ||
scheduler.alpha.kubernetes.io/critical-pod: "" | ||
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} | ||
labels: | ||
app: {{ template "aws-iam-authenticator.name" . }} | ||
release: {{ .Release.Name }} | ||
spec: | ||
# run on the host network (don't depend on CNI) | ||
hostNetwork: true | ||
|
||
# run on each master node | ||
nodeSelector: | ||
node-role.kubernetes.io/master: "" | ||
tolerations: | ||
- effect: NoSchedule | ||
key: node-role.kubernetes.io/master | ||
- key: CriticalAddonsOnly | ||
operator: Exists | ||
|
||
# run `aws-iam-authenticator server` with three volumes | ||
# - config (mounted from the ConfigMap at /etc/aws-iam-authenticator/config.yaml) | ||
# - state (persisted TLS certificate and keys, mounted from the host) | ||
# - output (output kubeconfig to plug into your apiserver configuration, mounted from the host) | ||
containers: | ||
- name: {{ template "aws-iam-authenticator.fullname" . }} | ||
image: gcr.io/heptio-images/authenticator:v0.1.0 | ||
args: | ||
- server | ||
- --config=/etc/aws-iam-authenticator/config.yaml | ||
- --state-dir=/var/aws-iam-authenticator | ||
- --generate-kubeconfig=/etc/kubernetes/aws-iam-authenticator/kubeconfig.yaml | ||
|
||
resources: | ||
{{ toYaml .Values.resources | indent 10 }} | ||
|
||
volumeMounts: | ||
- name: config | ||
mountPath: /etc/aws-iam-authenticator/ | ||
- name: state | ||
mountPath: /var/aws-iam-authenticator/ | ||
- name: output | ||
mountPath: /etc/kubernetes/aws-iam-authenticator/ | ||
|
||
volumes: | ||
- name: config | ||
configMap: | ||
name: {{ template "aws-iam-authenticator.fullname" . }} | ||
- name: output | ||
hostPath: | ||
path: {{ .Values.hostPathConfig.output }} | ||
- name: state | ||
hostPath: | ||
path: {{ .Values.hostPathConfig.state }} |
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,12 @@ | ||
image: | ||
repository: gcr.io/heptio-images/authenticator | ||
tag: v0.1.0 | ||
pullPolicy: IfNotPresent | ||
|
||
config: {} | ||
|
||
resources: {} | ||
|
||
hostPathConfig: | ||
output: /srv/kubernetes/aws-iam-authenticator/ | ||
state: /srv/kubernetes/aws-iam-authenticator/ |