Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/custom-glab-registry #19

Merged
merged 20 commits into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/CI_CD_App.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ jobs:
platforms: linux/amd64,linux/arm64/v8,linux/arm/v6,linux/arm/v7
push: true



1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ helm upgrade --install urunner oci://ghcr.io/texano00/urunner/helm/urunner --ver
| 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 |
| URUNNER_SECR_DIGITAL_OCEAN_TOKEN | Digital Ocean token | xxxxx |
| URUNNER_SECR_GITLAB_TOKEN | Gitlab token | xxxxx |
| URUNNER_SECR_GITLAB_URL | Gitlab URL | xxxxx |

## Flow

Expand Down
2 changes: 1 addition & 1 deletion app/.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.3
0.5.4
4 changes: 4 additions & 0 deletions app/utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,7 @@ def get_urunner_secr_digital_ocean_token():
def get_urunner_secr_gitlab_token():
"""def get_urunner_secr_gitlab_token"""
return os.environ.get("URUNNER_SECR_GITLAB_TOKEN", "xxxxx")

def get_urunner_secr_gitlab_url():
"""def get_urunner_secr_gitlab_url"""
return os.environ.get("URUNNER_SECR_GITLAB_URL", "https://gitlab.com")
2 changes: 1 addition & 1 deletion app/utils/dockerapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def get_digitalocean_auth(image: Image):
def get_gitlab_auth(image: Image):
"""get_gitlab_auth"""
auth_service = "container_registry"
auth_url = "https://gitlab.com/jwt/auth"
auth_url = f"{config.get_urunner_secr_gitlab_url()}/jwt/auth" or "https://gitlab.com/jwt/auth"
do_token = config.get_urunner_secr_gitlab_token()
do_token = b64encode(f"{do_token}:{do_token}".encode("ascii")).decode("ascii")
auth_header = f"Basic {do_token}"
Expand Down
2 changes: 1 addition & 1 deletion helm/urunner/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ icon: https://raw.githubusercontent.com/texano00/urunner/main/asset/logo.png
# 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: "0.5.3"
appVersion: "0.5.4"
2 changes: 1 addition & 1 deletion helm/urunner/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: cm-urunner
name: {{ .Values.config.configMapName | quote }}
labels:
{{- include "urunner.labels" . | nindent 4 }}
namespace: {{ .Release.Namespace | quote }}
Expand Down
5 changes: 4 additions & 1 deletion helm/urunner/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
kind: Secret
metadata:
name: secret-urunner
name: {{ .Values.secret.secretName | quote }}
namespace: {{ .Release.Namespace | quote }}
type: Opaque
stringData:
Expand All @@ -23,6 +23,9 @@ stringData:
{{- if .Values.secret.gitlab.token }}
URUNNER_SECR_GITLAB_TOKEN: {{ .Values.secret.gitlab.token | quote }}
{{- end }}
{{- if .Values.secret.gitlab.url }}
URUNNER_SECR_GITLAB_URL: {{ .Values.secret.gitlab.url | quote }}
{{- end }}
{{- end }}


4 changes: 3 additions & 1 deletion helm/urunner/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ image:
pullPolicy: IfNotPresent

config:
configMapName: "cm-urunner"
# se to false in order to disallow ssl verify to container registry
URUNNER_CONF_DOCKER_API_VERIFY: true
# Text logging level for the message ('DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL').
Expand All @@ -20,7 +21,7 @@ config:
secret:
create: true
# for expected keys see secret.yaml
secretName: ""
secretName: "secret-urunner"
harbor:
username:
password:
Expand All @@ -31,6 +32,7 @@ secret:
token:
gitlab:
token:
url:

imagePullSecrets: []
nameOverride: ""
Expand Down