Skip to content

Commit 451f131

Browse files
authored
Merge pull request #196 from imgproxy/v1
V1
2 parents 351a02f + afbd760 commit 451f131

File tree

12 files changed

+175
-2396
lines changed

12 files changed

+175
-2396
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## 1.0.0 (to be released)
2+
3+
* default imgproxy version: v3.28.0
4+
* service account selecton bug fix
5+
6+
### 🚨 Backward incompatible changes 🚨
7+
8+
* Remove all environment-specific values in favor of customizable env variables at `.Values.env.*`
9+
110
## 0.9.0 (2023-10-09)
211

312
* Support imgproxy v3.20.0

Readme.md

Lines changed: 41 additions & 326 deletions
Large diffs are not rendered by default.

imgproxy/Chart.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ apiVersion: v1
22
description: A fast and secure standalone server for resizing and converting remote images. The main principles of imgproxy are simplicity, speed, and security.
33
name: imgproxy
44
icon: https://cdn.rawgit.com/imgproxy/imgproxy/master/logo.svg
5-
version: 0.9.0
6-
appVersion: 3.20.0
5+
version: 1.0.0
6+
appVersion: 3.24.1
77
keywords:
88
- imgproxy
99
- image
@@ -25,7 +25,7 @@ annotations:
2525
artifacthub.io/containsSecurityUpdates: "false"
2626
artifacthub.io/images: |
2727
- name: impgroxy
28-
image: darthsim/imgproxy:v3.20.0
28+
image: darthsim/imgproxy:v3.23.0
2929
artifacthub.io/license: MIT-open-group
3030
artifacthub.io/links: |
3131
- name: imgproxy-helm chart on Github

imgproxy/README.md

Lines changed: 56 additions & 389 deletions
Large diffs are not rendered by default.

imgproxy/templates/_helpers.tpl

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,23 +37,31 @@ Template to generate secrets for a private Docker repository for K8s to use
3737
Template to decide if the serviceAccount must be built
3838
*/}}
3939
{{- define "serviceAccount.enabled" }}
40-
{{- $awsIamRoleDefined := and .Values.features.aws.enabled .Values.features.aws.iamRoleName -}}
41-
{{- $customAnnotations := .Values.resources.serviceAccount.annotations -}}
42-
{{- $existingName := .Values.resources.serviceAccount.existingName -}}
43-
{{- not $existingName | and (or $awsIamRoleDefined $customAnnotations) -}}
40+
{{- with .Values.resources.serviceAccount -}}
41+
{{- $useExistingName := (empty .existingName | not) -}}
42+
{{- $useIamRole := (empty .aws.iamRoleName | and (empty .aws.accountId) | not) -}}
43+
{{- $useAnnotations := (empty .annotations | not) -}}
44+
{{- if (and $useExistingName $useAnnotations) -}}
45+
{{- fail "Cannot add annotations to the external service account (check .resources.serviceAccount)" -}}
46+
{{- end -}}
47+
{{- if (and $useExistingName $useIamRole) -}}
48+
{{- fail "Cannot add IAM Role authentication to the external service account (check .resources.serviceAccount)" -}}
49+
{{- end -}}
50+
{{- (not $useExistingName | and (or $useAnnotations $useIamRole)) }}
51+
{{- end }}
4452
{{- end }}
4553

4654
{{/*
4755
Template to generate service account annotation for AWS IAM Role
4856
https://docs.aws.amazon.com/eks/latest/userguide/specify-service-account-role.html
4957
*/}}
5058
{{- define "aws.iamRoleAnnotation" }}
51-
{{- with .Values.features.aws -}}
52-
{{- $id := required "features.aws.accountId" .accountId -}}
53-
{{- $role := required "features.aws.iamRoleName" .iamRoleName -}}
59+
{{- with .Values.resources.serviceAccount.aws -}}
60+
{{- $id := required "resources.serviceAccount.aws.accountId" .accountId -}}
61+
{{- $role := required "resources.serviceAccount.aws.iamRoleName" .iamRoleName -}}
5462
{{- $value := printf "arn:aws:iam::%s:role/%s" $id $role -}}
5563
{{- printf "eks.amazonaws.com/role-arn: %s" (quote $value) }}
56-
{{- end }}
64+
{{- end -}}
5765
{{- end -}}
5866

5967
{{/* Name of the priority class */}}
@@ -106,7 +114,7 @@ https://docs.aws.amazon.com/eks/latest/userguide/specify-service-account-role.ht
106114

107115
{{/* Combine ingress path from server.pathPrefix and ingress.pathSuffix */}}
108116
{{- define "imgproxy.ingressPath" -}}
109-
{{- $prefix := ($.Values.features.server.pathPrefix | default "" | trimSuffix "/") -}}
117+
{{- $prefix := ($.Values.env.IMGPROXY_PATH_PREFIX | default "" | trimSuffix "/") -}}
110118
{{- $suffix := ($.Values.resources.ingress.pathSuffix | default "" | trimPrefix "/") -}}
111119
{{- printf "%s/%s" $prefix $suffix -}}
112120
{{- end -}}

imgproxy/templates/deployment.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ spec:
7070
{{- end }}
7171
{{- if $.Values.resources.serviceAccount.existingName }}
7272
serviceAccountName: {{ $.Values.resources.serviceAccount.existingName | quote }}
73-
{{- else if (include "serviceAccount.enabled" $) }}
73+
{{- else if (include "serviceAccount.enabled" $ | eq "true") }}
7474
serviceAccountName: "{{ template "imgproxy.fullname" $ }}-service-account"
7575
{{- end }}
7676
{{- if .Values.persistence.enabled }}
@@ -117,20 +117,20 @@ spec:
117117
- containerPort: 8080
118118
name: http
119119
protocol: TCP
120-
{{- if .Values.features.prometheus.enabled }}
121-
- containerPort: 8081
120+
{{- with .Values.env.IMGPROXY_PROMETHEUS_BIND }}
121+
- containerPort: {{ mustRegexSplit ":" . -1 | mustLast | int }}
122122
name: metrics
123123
protocol: TCP
124124
{{- end }}
125125
readinessProbe:
126126
httpGet:
127-
path: {{ .Values.features.server.pathPrefix }}/health
127+
path: {{ .Values.env.IMGPROXY_PATH_PREFIX }}/health
128128
port: 8080
129129
scheme: HTTP
130-
{{- if .Values.features.security.secret }}
130+
{{- if .Values.env.IMGPROXY_SECRET }}
131131
httpHeaders:
132132
- name: Authorization
133-
value: Bearer {{ .Values.features.security.secret }}
133+
value: Bearer {{ .Values.env.IMGPROXY_SECRET }}
134134
{{- end }}
135135
{{- with .Values.resources.deployment.readinessProbe }}
136136
initialDelaySeconds: {{ .initialDelaySeconds | default 10 }}
@@ -140,13 +140,13 @@ spec:
140140
{{- end }}
141141
livenessProbe:
142142
httpGet:
143-
path: {{ .Values.features.server.pathPrefix }}/health
143+
path: {{ .Values.env.IMGPROXY_PATH_PREFIX }}/health
144144
port: 8080
145145
scheme: HTTP
146-
{{- if .Values.features.security.secret }}
146+
{{- if .Values.env.IMGPROXY_SECRET }}
147147
httpHeaders:
148148
- name: Authorization
149-
value: Bearer {{ .Values.features.security.secret }}
149+
value: Bearer {{ .Values.env.IMGPROXY_SECRET }}
150150
{{- end }}
151151
{{- with .Values.resources.deployment.livenessProbe }}
152152
initialDelaySeconds: {{ .initialDelaySeconds | default 50 }}

0 commit comments

Comments
 (0)