Skip to content

Commit c6c6c3a

Browse files
dnskrmattray
andauthored
Make imagePullPolicy properties configurable (#89)
Signed-off-by: Matt Ray <github@mattray.dev> Co-authored-by: Matt Ray <github@mattray.dev>
1 parent dd9e27a commit c6c6c3a

File tree

5 files changed

+22
-17
lines changed

5 files changed

+22
-17
lines changed

charts/opencost/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ keywords:
99
- kubecost
1010
- opencost
1111
- monitoring
12-
version: 1.16.1
12+
version: 1.17.0
1313
maintainers:
1414
- name: mattray
1515
url: https://mattray.dev

charts/opencost/README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
OpenCost and OpenCost UI
44

5-
![Version: 1.16.1](https://img.shields.io/badge/Version-1.16.0-informational?style=flat-square)
5+
![Version: 1.17.0](https://img.shields.io/badge/Version-1.17.0-informational?style=flat-square)
66
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
77
![AppVersion: 1.104.4](https://img.shields.io/badge/AppVersion-1.104.0-informational?style=flat-square)
88

@@ -37,22 +37,21 @@ $ helm install opencost opencost/opencost
3737
| opencost.exporter.defaultClusterId | string | `"default-cluster"` | Default cluster ID to use if cluster_id is not set in Prometheus metrics. |
3838
| opencost.exporter.extraEnv | object | `{}` | Any extra environment variables you would like to pass on to the pod |
3939
| opencost.exporter.extraVolumeMounts | list | `[]` | A list of volume mounts to be added to the pod |
40+
| opencost.exporter.image.pullPolicy | string | `"IfNotPresent"` | Exporter container image pull policy |
4041
| opencost.exporter.image.registry | string | `"quay.io"` | Exporter container image registry |
4142
| opencost.exporter.image.repository | string | `"kubecost1/kubecost-cost-model"` | Exporter container image name |
4243
| opencost.exporter.image.tag | string | `""` (use appVersion in Chart.yaml) | Exporter container image tag |
43-
| opencost.exporter.livenessProbe | object | `{"enabled":true,"failureThreshold":200,"initialDelaySeconds":30,"periodSeconds":10}` | Liveness probe configuration |
4444
| opencost.exporter.livenessProbe.enabled | bool | `true` | Whether probe is enabled |
45-
| opencost.exporter.livenessProbe.failureThreshold | int | `200` | Number of failures for probe to be considered failed |
45+
| opencost.exporter.livenessProbe.failureThreshold | int | `3` | Number of failures for probe to be considered failed |
4646
| opencost.exporter.livenessProbe.initialDelaySeconds | int | `30` | Number of seconds before probe is initiated |
4747
| opencost.exporter.livenessProbe.periodSeconds | int | `10` | Probe frequency in seconds |
4848
| opencost.exporter.persistence.accessMode | string | `""` | Access mode for persistent volume |
4949
| opencost.exporter.persistence.annotations | object | `{}` | Annotations for persistent volume |
5050
| opencost.exporter.persistence.enabled | bool | `false` | |
5151
| opencost.exporter.persistence.size | string | `""` | Size for persistent volume |
5252
| opencost.exporter.persistence.storageClass | string | `""` | Storage class for persistent volume |
53-
| opencost.exporter.readinessProbe | object | `{"enabled":true,"failureThreshold":200,"initialDelaySeconds":30,"periodSeconds":10}` | Readiness probe configuration |
5453
| opencost.exporter.readinessProbe.enabled | bool | `true` | Whether probe is enabled |
55-
| opencost.exporter.readinessProbe.failureThreshold | int | `200` | Number of failures for probe to be considered failed |
54+
| opencost.exporter.readinessProbe.failureThreshold | int | `3` | Number of failures for probe to be considered failed |
5655
| opencost.exporter.readinessProbe.initialDelaySeconds | int | `30` | Number of seconds before probe is initiated |
5756
| opencost.exporter.readinessProbe.periodSeconds | int | `10` | Probe frequency in seconds |
5857
| opencost.exporter.replicas | int | `1` | Number of OpenCost replicas to run |
@@ -68,18 +67,23 @@ $ helm install opencost opencost/opencost
6867
| opencost.metrics.serviceMonitor.scrapeInterval | string | `"30s"` | Interval at which metrics should be scraped |
6968
| opencost.nodeSelector | object | `{}` | Node labels for pod assignment |
7069
| opencost.prometheus.bearer_token | string | `""` | Prometheus Bearer token |
70+
| opencost.prometheus.bearer_token_key | string | `"DB_BEARER_TOKEN"` | |
7171
| opencost.prometheus.external.enabled | bool | `false` | Use external Prometheus (eg. Grafana Cloud) |
7272
| opencost.prometheus.external.url | string | `"https://prometheus.example.com/prometheus"` | External Prometheus url |
7373
| opencost.prometheus.internal.enabled | bool | `true` | Use in-cluster Prometheus |
7474
| opencost.prometheus.internal.namespaceName | string | `"opencost"` | Namespace of in-cluster Prometheus |
7575
| opencost.prometheus.internal.port | int | `9090` | Service port of in-cluster Prometheus |
7676
| opencost.prometheus.internal.serviceName | string | `"my-prometheus"` | Service name of in-cluster Prometheus |
7777
| opencost.prometheus.password | string | `""` | Prometheus Basic auth password |
78+
| opencost.prometheus.password_key | string | `"DB_BASIC_AUTH_PW"` | Key in the secret that references the password |
79+
| opencost.prometheus.secret_name | string | `nil` | Secret name that contains credentials for Prometheus |
7880
| opencost.prometheus.username | string | `""` | Prometheus Basic auth username |
81+
| opencost.prometheus.username_key | string | `"DB_BASIC_AUTH_USERNAME"` | Key in the secret that references the username |
7982
| opencost.tolerations | list | `[]` | Toleration labels for pod assignment |
8083
| opencost.topologySpreadConstraints | list | `[]` | Assign custom TopologySpreadConstraints rules |
8184
| opencost.ui.enabled | bool | `true` | Enable OpenCost UI |
8285
| opencost.ui.extraVolumeMounts | list | `[]` | A list of volume mounts to be added to the pod |
86+
| opencost.ui.image.pullPolicy | string | `"IfNotPresent"` | UI container image pull policy |
8387
| opencost.ui.image.registry | string | `"quay.io"` | UI container image registry |
8488
| opencost.ui.image.repository | string | `"kubecost1/opencost-ui"` | UI container image name |
8589
| opencost.ui.image.tag | string | `""` (use appVersion in Chart.yaml) | UI container image tag |
@@ -88,14 +92,12 @@ $ helm install opencost opencost/opencost
8892
| opencost.ui.ingress.hosts | list | See [values.yaml](values.yaml) | A list of host rules used to configure the Ingress |
8993
| opencost.ui.ingress.ingressClassName | string | `""` | Ingress controller which implements the resource |
9094
| opencost.ui.ingress.tls | list | `[]` | Ingress TLS configuration |
91-
| opencost.ui.livenessProbe | object | `{"enabled":true,"failureThreshold":200,"initialDelaySeconds":30,"periodSeconds":10}` | Liveness probe configuration |
9295
| opencost.ui.livenessProbe.enabled | bool | `true` | Whether probe is enabled |
93-
| opencost.ui.livenessProbe.failureThreshold | int | `200` | Number of failures for probe to be considered failed |
96+
| opencost.ui.livenessProbe.failureThreshold | int | `3` | Number of failures for probe to be considered failed |
9497
| opencost.ui.livenessProbe.initialDelaySeconds | int | `30` | Number of seconds before probe is initiated |
9598
| opencost.ui.livenessProbe.periodSeconds | int | `10` | Probe frequency in seconds |
96-
| opencost.ui.readinessProbe | object | `{"enabled":true,"failureThreshold":200,"initialDelaySeconds":30,"periodSeconds":10}` | Readiness probe configuration |
9799
| opencost.ui.readinessProbe.enabled | bool | `true` | Whether probe is enabled |
98-
| opencost.ui.readinessProbe.failureThreshold | int | `200` | Number of failures for probe to be considered failed |
100+
| opencost.ui.readinessProbe.failureThreshold | int | `3` | Number of failures for probe to be considered failed |
99101
| opencost.ui.readinessProbe.initialDelaySeconds | int | `30` | Number of seconds before probe is initiated |
100102
| opencost.ui.readinessProbe.periodSeconds | int | `10` | Probe frequency in seconds |
101103
| opencost.ui.resources.limits | object | `{"cpu":"999m","memory":"1Gi"}` | CPU/Memory resource limits |

charts/opencost/templates/clusterrole.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,3 @@ rules:
7777
- get
7878
- list
7979
- watch
80-

charts/opencost/templates/deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ spec:
5252
containers:
5353
- name: {{ include "opencost.fullname" . }}
5454
image: "{{ .Values.opencost.exporter.image.registry }}/{{ .Values.opencost.exporter.image.repository }}:{{ .Values.opencost.exporter.image.tag | default (printf "prod-%s" .Chart.AppVersion) }}"
55-
imagePullPolicy: Always
55+
imagePullPolicy: {{ .Values.opencost.exporter.image.pullPolicy }}
5656
ports:
5757
- containerPort: 9003
5858
name: http
@@ -148,7 +148,7 @@ spec:
148148
{{- if .Values.opencost.ui.enabled }}
149149
- name: opencost-ui
150150
image: "{{ .Values.opencost.ui.image.registry }}/{{ .Values.opencost.ui.image.repository }}:{{ .Values.opencost.ui.image.tag | default (printf "prod-%s" .Chart.AppVersion) }}"
151-
imagePullPolicy: Always
151+
imagePullPolicy: {{ .Values.opencost.ui.image.pullPolicy }}
152152
ports:
153153
- containerPort: 9090
154154
name: http-ui

charts/opencost/values.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ opencost:
5555
# -- Exporter container image tag
5656
# @default -- `""` (use appVersion in Chart.yaml)
5757
tag: ""
58+
# -- Exporter container image pull policy
59+
pullPolicy: IfNotPresent
5860
# -- Number of OpenCost replicas to run
5961
replicas: 1
6062
resources:
@@ -66,7 +68,7 @@ opencost:
6668
limits:
6769
cpu: '999m'
6870
memory: '1Gi'
69-
# -- Liveness probe configuration
71+
# Liveness probe configuration
7072
livenessProbe:
7173
# -- Whether probe is enabled
7274
enabled: true
@@ -76,7 +78,7 @@ opencost:
7678
periodSeconds: 10
7779
# -- Number of failures for probe to be considered failed
7880
failureThreshold: 3
79-
# -- Readiness probe configuration
81+
# Readiness probe configuration
8082
readinessProbe:
8183
# -- Whether probe is enabled
8284
enabled: true
@@ -178,6 +180,8 @@ opencost:
178180
# -- UI container image tag
179181
# @default -- `""` (use appVersion in Chart.yaml)
180182
tag: ""
183+
# -- UI container image pull policy
184+
pullPolicy: IfNotPresent
181185
resources:
182186
# -- CPU/Memory resource requests
183187
requests:
@@ -187,7 +191,7 @@ opencost:
187191
limits:
188192
cpu: '999m'
189193
memory: '1Gi'
190-
# -- Liveness probe configuration
194+
# Liveness probe configuration
191195
livenessProbe:
192196
# -- Whether probe is enabled
193197
enabled: true
@@ -197,7 +201,7 @@ opencost:
197201
periodSeconds: 10
198202
# -- Number of failures for probe to be considered failed
199203
failureThreshold: 3
200-
# -- Readiness probe configuration
204+
# Readiness probe configuration
201205
readinessProbe:
202206
# -- Whether probe is enabled
203207
enabled: true

0 commit comments

Comments
 (0)