Skip to content

Commit

Permalink
Merge pull request #24 from imgproxy/v0.7.0
Browse files Browse the repository at this point in the history
V0.7.0
  • Loading branch information
nepalez authored May 27, 2021
2 parents 2f0fdc8 + f79de1a commit 42f88c3
Show file tree
Hide file tree
Showing 18 changed files with 1,416 additions and 960 deletions.
23 changes: 22 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
## 0.7.0 (2021-05-27)

* (Breaking) rearrange keys in `values.yaml`
* (Breaking) add opinionated service account annotiations for AWS IAM role
* (New) add support for the following env variables
- IMGPROXY_SET_CANONICAL_HEADER
- IMGPROXY_ENABLE_DEBUG_HEADERS
- IMGPROXY_MAX_SVG_CHECK_BYTES
- IMGPROXY_ALLOW_ORIGIN
- IMGPROXY_FORMAT_QUALITY
- IMGPROXY_AVIF_SPEED
- IMGPROXY_ENABLE_AVIF_DETECTION
- IMGPROXY_ENFORCE_AVIF
- IMGPROXY_UNSHARPENING_WEIGHT
- IMGPROXY_UNSHARPENING_DIVIDOR
- IMGPROXY_SKIP_PROCESSING_FORMATS
- IMGPROXY_STRIP_COLOR_PROFILE
- IMGPROXY_AUTO_ROTATE
* (Fix) add serviceMonitor only when Prometheus is enabled
* (Fix) readme file

## 0.6.4 (2021-05-27)

* (Add) support for service accounts
Expand All @@ -18,7 +39,7 @@
## 0.6.0 (2020-11-22)

* (Fix) deployment indentations
* (New) pod annotations values were ranamed
* (New) pod annotations values were renamed

## 0.5.11 (2020-11-20)

Expand Down
375 changes: 242 additions & 133 deletions Readme.md

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion imgproxy/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
description: A fast and secure standalone server for resizing and converting remote images. The main principles of imgproxy are simplicity, speed, and security.
name: imgproxy
icon: https://cdn.rawgit.com/imgproxy/imgproxy/master/logo.svg
version: 0.6.4
version: 0.7.0
appVersion: 2.15.0
keywords:
- imgproxy
Expand All @@ -16,3 +16,5 @@ maintainers:
email: darthsim@evilmartians.com
- name: dragonsmith
email: agon.smith@gmail.com
- name: nepalez
email: nepalez@evilmartians.com
20 changes: 10 additions & 10 deletions imgproxy/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@ imgproxy is now running in your cluster.

It can be accessed:

{{- if contains "NodePort" .Values.serviceType }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "imgproxy.fullname" . }})
{{- if contains "NodePort" .Values.resources.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "imgproxy.fullname" $ }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo "$NODE_IP:$NODE_PORT"
{{- else if contains "LoadBalancer" .Values.serviceType }}
{{- else if contains "LoadBalancer" .Values.resources.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status by running 'kubectl get svc -w {{ template "imgproxy.fullname" . }}'
You can watch the status by running 'kubectl get svc -w {{ template "imgproxy.fullname" $ }}'

export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "imgproxy.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "imgproxy.fullname" $ }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo $SERVICE_IP
{{- else if contains "ClusterIP" .Values.serviceType }}
{{- else if contains "ClusterIP" .Values.resources.service.type }}

"{{ template "imgproxy.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local"
"{{ template "imgproxy.fullname" $ }}.{{ .Release.Namespace }}.svc.cluster.local"
from within the cluster
{{- end }}

{{ if .Values.ingress.enabled -}}
{{ if .Values.resources.ingress.enabled -}}
There is also an Ingress resource(s) enabled for this installation.
It can be accessed outside via the URL(s):
{{- $tlsHosts := list -}}
{{- range .Values.ingress.tls -}}
{{- range .Values.resources.ingress.tls -}}
{{- $tlsHosts = concat $tlsHosts .hosts -}}
{{- end -}}
{{- range .Values.ingress.hosts -}}
{{- range .Values.resources.ingress.hosts -}}
{{- $host := . -}}
{{- $scheme := ternary "https://" "http://" (has $host $tlsHosts) }}
{{ $scheme }}{{ $host }}{{ default "/" $.Values.pathPrefix }}
Expand Down
31 changes: 30 additions & 1 deletion imgproxy/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,34 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
Template to generate secrets for a private Docker repository for K8s to use
*/}}
{{- define "imgproxy.imagePullSecrets" }}
{{- printf "{\"auths\": {\"%s\": {\"auth\": \"%s\"}}}" .Values.imagePullSecrets.registry (printf "%s:%s" .Values.imagePullSecrets.username .Values.imagePullSecrets.password | b64enc) | b64enc }}
{{- with .Values.image.pullSecrets -}}
{{- if .enabled }}
{{- $username := required "image.pullSecrets.username" .username -}}
{{- $registry := required "image.pullSecrets.registry" .registry -}}
{{- $password := required "image.pullSecrets.password" .password -}}
{{- printf "{\"auths\": {\"%s\": {\"auth\": \"%s\"}}}" $registry (printf "%s:%s" $username $password | b64enc) | b64enc }}
{{- end }}
{{- end -}}
{{- end -}}

{{/*
Template to decide if the serviceAccount must be built
*/}}
{{- define "serviceAccount.enabled" }}
{{- $awsIamRoleDefined := and .Values.features.aws.enabled .Values.features.aws.iamRoleName -}}
{{- $customAnnotations := .Values.resources.serviceAccount.annotations -}}
{{- or $awsIamRoleDefined $customAnnotations -}}
{{- end }}

{{/*
Template to generate service account annotation for AWS IAM Role
https://docs.aws.amazon.com/eks/latest/userguide/specify-service-account-role.html
*/}}
{{- define "aws.iamRoleAnnotation" }}
{{- with .Values.features.aws -}}
{{- $id := required "features.aws.accountId" .accountId -}}
{{- $role := required "features.aws.iamRoleName" .iamRoleName -}}
{{- $value := printf "arn:aws:iam::%s:role/%s" $id $role -}}
{{- printf "eks.amazonaws.com/role-arn: %s" (quote $value) }}
{{- end }}
{{- end -}}
Loading

0 comments on commit 42f88c3

Please sign in to comment.