[incubator/fluent-cloudwatch] Fix fatal bug and Support EC2 instance role (#7707)

* Add case, Using InstanceRole

Signed-off-by: masahiro331 <m_fujimura@r.recruit.co.jp>

* fix README.md

Signed-off-by: masahiro331 <m_fujimura@r.recruit.co.jp>
This commit is contained in:
masahiro
2018-10-06 14:31:21 -07:00
committed by k8s-ci-robot
parent c1576743fa
commit a193775d1b
7 changed files with 20 additions and 7 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
name: fluentd-cloudwatch
version: 0.5.1
version: 0.5.2
appVersion: v0.12.43-cloudwatch
description: A Fluentd CloudWatch Helm chart for Kubernetes.
home: https://www.fluentd.org/
+5 -1
View File
@@ -22,8 +22,10 @@ This chart bootstraps a [Fluentd](https://www.fluentd.org/) [Cloudwatch](https:/
To install the chart with the release name `my-release`:
```console
$ # edit secrets/aws_access_key_id and secrets/aws_access_key_id with the key/password of a AWS user with a policy to access Cloudwatch
$ # use ec2 instance role credential
$ helm install --name my-release incubator/fluentd-cloudwatch
$ # or add aws_access_key_id and aws_access_key_id with the key/password of a AWS user with a policy to access Cloudwatch
$ helm install --name my-release incubator/fluentd-cloudwatch --set awsAccessKeyId=aws_access_key_id_here --set awsSecretAccessKey=aws_secret_access_key_here
$ # or add a role to aws with the correct policy to add to cloud watch
$ helm install --name my-release incubator/fluentd-cloudwatch --set awsRole=roll_name_here
```
@@ -57,6 +59,8 @@ The following table lists the configurable parameters of the Fluentd Cloudwatch
| `annotations` (removed for now) | Annotations | `nil` |
| `awsRegion` | AWS Cloudwatch region | `us-east-1` |
| `awsRole` | AWS IAM Role To Use | `nil` |
| `awsAccessKeyId` | AWS Access Key Id of a AWS user with a policy to access Cloudwatch | `nil` |
| `awsSecretAccessKey` | AWS Secret Access Key of a AWS user with a policy to access Cloudwatch | `nil` |
| `fluentdConfig` | Fluentd configuration | `example configuration` |
| `logGroupName` | AWS Cloudwatch log group | `kubernetes` |
| `rbac.create` | If true, create & use RBAC resources | `false` |
@@ -1 +0,0 @@
<AWS_ACCESS_KEY_ID>
@@ -1 +0,0 @@
<AWS_SECRET_ACCESS_KEY>
@@ -40,17 +40,21 @@ spec:
- name: LOG_GROUP_NAME
value: {{ .Values.logGroupName }}
{{- if not .Values.awsRole }}
{{- if .Values.awsAccessKeyId }}
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
key: aws_access_key_id
key: AWS_ACCESS_KEY_ID
name: {{ template "fluentd-cloudwatch.fullname" . }}
{{- end }}
{{- if .Values.awsSecretAccessKey }}
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
key: aws_secret_access_key
key: AWS_SECRET_ACCESS_KEY
name: {{ template "fluentd-cloudwatch.fullname" . }}
{{- end }}
{{- end }}
{{- range $env := .Values.extraVars }}
- {{ $env }}
{{- end }}
@@ -10,5 +10,10 @@ metadata:
release: {{ .Release.Name }}
type: Opaque
data:
{{ (.Files.Glob "secrets/*").AsSecrets | indent 2 }}
{{- if .Values.awsAccessKeyId }}
AWS_ACCESS_KEY_ID: {{ .Values.awsAccessKeyId | b64enc }}
{{- end }}
{{- if .Values.awsSecretAccessKey }}
AWS_SECRET_ACCESS_KEY: {{ .Values.awsSecretAccessKey | b64enc }}
{{- end }}
{{- end }}
+2
View File
@@ -29,6 +29,8 @@ annotations: {}
awsRegion: us-east-1
awsRole:
awsAccessKeyId:
awsSecretAccessKey:
logGroupName: kubernetes
rbac: