Skip to content

Commit

Permalink
fix: update docker registeries variable and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
itzmanish committed Oct 26, 2022
1 parent 6cf3db9 commit ec40098
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 36 deletions.
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,24 @@ $ go install github.com/itzmanish/ecr-token-renew@latest

## Helm Usage

[Helm](https://helm.sh) must be installed to use the charts. Please refer to
[Helm](https://helm.sh) must be installed to use the charts. Please refer to
Helm's [documentation](https://helm.sh/docs) to get started.

Once Helm has been set up correctly, add the repo as follows:

helm repo add ecr-token-renew https://itzmanish.github.io/ecr-token-renew
helm repo add ecr-token-renew https://itzmanish.github.io/ecr-token-renew

If you had already added this repo earlier, run `helm repo update` to retrieve
the latest versions of the packages. You can then run `helm search repo
ecr-token-renew` to see the charts.
the latest versions of the packages. You can then run `helm search repo ecr-token-renew` to see the charts.

To install the ecr-token-renew chart:

helm install my-ecr-token-renew ecr-token-renew/chart

Note: you need to override `configMapKeyRef` key with correct configmap value
where your AWS credentials are present. you can always append `-f override.yaml`
on the above command.
on the above command. Checkout charts/deployment/values.yaml for default values.

To uninstall the chart:

helm uninstall my-ecr-token-renew

4 changes: 2 additions & 2 deletions charts/deployment/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.3
version: 0.1.4

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: '1.16.0'
appVersion: "1.16.0"
56 changes: 29 additions & 27 deletions charts/deployment/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,35 @@ kind: Job
metadata:
name: {{include "chart.fullname" .}}
labels: {{- include "chart.labels" . | nindent 4}}
spec:
template:
metadata:
spec:
template:
metadata:
name: {{include "chart.fullname" .}}
spec:
spec:
restartPolicy: OnFailure
containers:
- name: {{.Chart.Name}}
image: '{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}'
imagePullPolicy: {{.Values.image.pullPolicy}}
env:
- name: DOCKER_SECRET_NAME
value: {{.Values.dockerSecretName}}
- name: TARGET_NAMESPACE
value: {{$.Release.Namespace}}
- name: AWS_REGION
valueFrom:
configMapKeyRef:
name: {{.Values.configMapKeyRef}}
key: AWS_REGION
- name: AWS_ACCESS_KEY_ID
valueFrom:
configMapKeyRef:
name: {{.Values.configMapKeyRef}}
key: AWS_ACCESS_KEY_ID
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
configMapKeyRef:
name: {{.Values.configMapKeyRef}}
key: AWS_SECRET_ACCESS_KEY
- name: {{.Chart.Name}}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{.Values.image.pullPolicy}}
env:
- name: DOCKER_SECRET_NAME
value: {{.Values.dockerSecretName}}
- name: TARGET_NAMESPACE
value: {{$.Release.Namespace}}
- name: DOCKER_REGISTRIES
value: {{.Values.dockerRegisteries}}
- name: AWS_REGION
valueFrom:
configMapKeyRef:
name: {{.Values.configMapKeyRef}}
key: AWS_REGION
- name: AWS_ACCESS_KEY_ID
valueFrom:
configMapKeyRef:
name: {{.Values.configMapKeyRef}}
key: AWS_ACCESS_KEY_ID
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
configMapKeyRef:
name: {{.Values.configMapKeyRef}}
key: AWS_SECRET_ACCESS_KEY
1 change: 1 addition & 0 deletions charts/deployment/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ image:
namespace: ""
configMapKeyRef: "backend"
dockerSecretName: ""
dockerRegisteries: "" # multiple comma seperated registeries supported
nameOverride: ""
fullnameOverride: ""

Expand Down

0 comments on commit ec40098

Please sign in to comment.