Skip to content

Commit 61ebda7

Browse files
author
Jarl Törnroos
authored
Merge pull request #3 from ddrugeon/feature/add_annotations
Feature/add annotations
2 parents 14c1e99 + e380faa commit 61ebda7

File tree

4 files changed

+26
-1
lines changed

4 files changed

+26
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ The following table list the configurable parameters of the chart and their defa
5656
| kubernetesConf | kubernetes.conf content | Not set |
5757
| resources | Resources allocation (Requests and Limits) | {} |
5858
| rbac.create | Whether RBAC resources are created | true |
59-
59+
| instanceProfileCredentials | AWS instance profile credentials | false |
60+
| instanceProfileIPAddress | IP Address to get instance profile credentials | 169.254.169.254 |
61+
| instanceProfilePort | Port to get instance profile credentials | 80 |
62+
| podAnnotations | Annotations | {} |
6063
### Overriding configurations
6164

6265
Parameters can be overridden when installing the chart. For example assuming an IAM role for another AWS account were Kinesis Firehose is running:

templates/daemonset.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ spec:
1818
k8s-app: fluentd-logging
1919
version: v1
2020
kubernetes.io/cluster-service: "true"
21+
annotations:
22+
checksum/config: {{ include (print $.Template.BasePath "/fluent-conf.yaml") . | sha256sum }}
23+
{{- if .Values.podAnnotations }}
24+
{{ toYaml .Values.podAnnotations | indent 8 }}
25+
{{- end }}
2126
spec:
2227
serviceAccount: {{ include "helm-fluentd-kinesis-firehose.fullname" . }}
2328
serviceAccountName: {{ include "helm-fluentd-kinesis-firehose.fullname" . }}
@@ -34,6 +39,12 @@ spec:
3439
value: "{{ .Values.fluentEnvs.roleARN }}"
3540
- name: ROLE_SESSION_NAME
3641
value: "{{ .Values.fluentEnvs.roleSession }}"
42+
{{- end}}
43+
{{- if .Values.fluentEnvs.instanceProfileCredentials }}
44+
- name: INSTANCE_PROFILE_IP_ADDRESS
45+
value: "{{ .Values.fluentEnvs.instanceProfileIPAddress }}"
46+
- name: INSTANCE_PROFILE_PORT
47+
value: "{{ .Values.fluentEnvs.instanceProfilePort }}"
3748
{{- end}}
3849
- name: FLUENT_KINESIS_STREAMS_REGION
3950
value: "{{ .Values.fluentEnvs.kinesisRegion }}"

templates/fluent-conf.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ data:
3333
role_arn "#{ENV['ROLE_ARN']}"
3434
role_session_name "#{ENV['ROLE_SESSION_NAME']}"
3535
</assume_role_credentials>
36+
{{- end}}
37+
{{- if .Values.fluentEnvs.instanceProfileCredentials }}
38+
<instance_profile_credentials>
39+
ip_address "#{ENV['INSTANCE_PROFILE_IP_ADDRESS']}"
40+
port "#{ENV['INSTANCE_PROFILE_PORT']}"
41+
</instance_profile_credentials>
3642
{{- end}}
3743
</match>
3844
{{- end}}

values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ fluentEnvs:
1919
kinesisIncludeTimeKey: "true"
2020
bufferChunkLimitSize: "2M"
2121
bufferQueueLimitLength: "32"
22+
instanceProfileCredentials: false
23+
instanceProfileIPAddress: "169.254.169.254"
24+
instanceProfilePort: "80"
25+
26+
podAnnotations: {}
2227

2328
# The configuration files can be overrided by adding the variables,
2429
# fluentConf, kubernetesConf and systemdConf. kubernetesConf Example:

0 commit comments

Comments
 (0)