Skip to content

Commit 8de1539

Browse files
authored
Merge pull request #19 from avznog/fix/custom-glab-registry
fix/custom-glab-registry
2 parents fea7724 + 95ab1c8 commit 8de1539

File tree

9 files changed

+18
-8
lines changed

9 files changed

+18
-8
lines changed

.github/workflows/CI_CD_App.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,4 @@ jobs:
9191
platforms: linux/amd64,linux/arm64/v8,linux/arm/v6,linux/arm/v7
9292
push: true
9393

94-
94+

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ helm upgrade --install urunner oci://ghcr.io/texano00/urunner/helm/urunner --ver
8181
| URUNNER_SECR_AWS_SECRET_ACCESS_KEY | AWS credential in order to pull from AWS private ECR, configure only if registry type is aws_ecr | wJalrXUtnFEMI/K7MDENG/xRfiCYEXAMPLEKEY |
8282
| URUNNER_SECR_DIGITAL_OCEAN_TOKEN | Digital Ocean token | xxxxx |
8383
| URUNNER_SECR_GITLAB_TOKEN | Gitlab token | xxxxx |
84+
| URUNNER_SECR_GITLAB_AUTH_URL | Gitlab URL where `/jwt/auth` API is exposed. This is usually the same URL where GitLab instance itself is exposed. | my-gitlab.com |
8485

8586
## Flow
8687

app/.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.5.3
1+
0.5.4

app/utils/config.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,7 @@ def get_urunner_secr_digital_ocean_token():
6969
def get_urunner_secr_gitlab_token():
7070
"""def get_urunner_secr_gitlab_token"""
7171
return os.environ.get("URUNNER_SECR_GITLAB_TOKEN", "xxxxx")
72+
73+
def get_urunner_secr_gitlab_auth_url():
74+
"""def get_urunner_secr_gitlab_auth_url"""
75+
return os.environ.get("URUNNER_SECR_GITLAB_AUTH_URL", "https://gitlab.com")

app/utils/dockerapi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def get_digitalocean_auth(image: Image):
7070
def get_gitlab_auth(image: Image):
7171
"""get_gitlab_auth"""
7272
auth_service = "container_registry"
73-
auth_url = "https://gitlab.com/jwt/auth"
73+
auth_url = f"{config.get_urunner_secr_gitlab_auth_url()}/jwt/auth"
7474
do_token = config.get_urunner_secr_gitlab_token()
7575
do_token = b64encode(f"{do_token}:{do_token}".encode("ascii")).decode("ascii")
7676
auth_header = f"Basic {do_token}"

helm/urunner/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.6.2
18+
version: 0.6.3
1919
icon: https://raw.githubusercontent.com/texano00/urunner/main/asset/logo.png
2020

2121
# This is the version number of the application being deployed. This version number should be
2222
# incremented each time you make changes to the application. Versions are not expected to
2323
# follow Semantic Versioning. They should reflect the version the application is using.
2424
# It is recommended to use it with quotes.
25-
appVersion: "0.5.3"
25+
appVersion: "0.5.4"

helm/urunner/templates/configmap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v1
22
kind: ConfigMap
33
metadata:
4-
name: cm-urunner
4+
name: {{ .Values.config.configMapName | quote }}
55
labels:
66
{{- include "urunner.labels" . | nindent 4 }}
77
namespace: {{ .Release.Namespace | quote }}

helm/urunner/templates/secret.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apiVersion: v1
33
kind: Secret
44
metadata:
5-
name: secret-urunner
5+
name: {{ .Values.secret.secretName | quote }}
66
namespace: {{ .Release.Namespace | quote }}
77
type: Opaque
88
stringData:
@@ -23,6 +23,9 @@ stringData:
2323
{{- if .Values.secret.gitlab.token }}
2424
URUNNER_SECR_GITLAB_TOKEN: {{ .Values.secret.gitlab.token | quote }}
2525
{{- end }}
26+
{{- if .Values.secret.gitlab.url }}
27+
URUNNER_SECR_GITLAB_AUTH_URL: {{ .Values.secret.gitlab.auth_url | quote }}
28+
{{- end }}
2629
{{- end }}
2730

2831

helm/urunner/values.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ image:
33
pullPolicy: IfNotPresent
44

55
config:
6+
configMapName: "cm-urunner"
67
# se to false in order to disallow ssl verify to container registry
78
URUNNER_CONF_DOCKER_API_VERIFY: true
89
# Text logging level for the message ('DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL').
@@ -20,7 +21,7 @@ config:
2021
secret:
2122
create: true
2223
# for expected keys see secret.yaml
23-
secretName: ""
24+
secretName: "secret-urunner"
2425
harbor:
2526
username:
2627
password:
@@ -31,6 +32,7 @@ secret:
3132
token:
3233
gitlab:
3334
token:
35+
auth_url:
3436

3537
imagePullSecrets: []
3638
nameOverride: ""

0 commit comments

Comments
 (0)