Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
b8dc0150
"...ssh:/git@developer.sourcefind.cn:2222/OpenDAS/dynamo.git" did not exist on "72128596338193afcc4cbf24901db04282856dd5"
Unverified
Commit
b8dc0150
authored
Jun 04, 2025
by
mohammedabdulwahhab
Committed by
GitHub
Jun 04, 2025
Browse files
fix: dockerhub registry issues in dynamo operator (#1350)
parent
e83009a6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
deploy/cloud/helm/deploy.sh
deploy/cloud/helm/deploy.sh
+7
-1
deploy/cloud/helm/platform/components/operator/templates/_helpers.tpl
.../helm/platform/components/operator/templates/_helpers.tpl
+3
-0
deploy/cloud/operator/internal/controller/dynamocomponent_controller.go
...perator/internal/controller/dynamocomponent_controller.go
+0
-3
No files found.
deploy/cloud/helm/deploy.sh
View file @
b8dc0150
...
@@ -85,10 +85,16 @@ fi
...
@@ -85,10 +85,16 @@ fi
if
[[
-n
"
${
DOCKER_USERNAME
:-}
"
&&
-n
"
${
DOCKER_PASSWORD
:-}
"
]]
;
then
if
[[
-n
"
${
DOCKER_USERNAME
:-}
"
&&
-n
"
${
DOCKER_PASSWORD
:-}
"
]]
;
then
echo
"Creating/updating Docker registry secret '
$DOCKER_SECRET_NAME
' in namespace '
$NAMESPACE
'..."
echo
"Creating/updating Docker registry secret '
$DOCKER_SECRET_NAME
' in namespace '
$NAMESPACE
'..."
# Transform docker.io URLs to index.docker.io/v1/
DOCKER_SERVER_FOR_SECRET
=
"
$DOCKER_SERVER
"
if
[[
"
$DOCKER_SERVER
"
==
"docker.io"
||
"
$DOCKER_SERVER
"
==
"docker.io/"
*
]]
;
then
DOCKER_SERVER_FOR_SECRET
=
"https://index.docker.io/v1/"
fi
kubectl create secret docker-registry
"
$DOCKER_SECRET_NAME
"
\
kubectl create secret docker-registry
"
$DOCKER_SECRET_NAME
"
\
--docker-username
=
"
$DOCKER_USERNAME
"
\
--docker-username
=
"
$DOCKER_USERNAME
"
\
--docker-password
=
"
$DOCKER_PASSWORD
"
\
--docker-password
=
"
$DOCKER_PASSWORD
"
\
--docker-server
=
"
$DOCKER_SERVER
"
\
--docker-server
=
"
$DOCKER_SERVER
_FOR_SECRET
"
\
--namespace
"
$NAMESPACE
"
\
--namespace
"
$NAMESPACE
"
\
--dry-run
=
client
-o
yaml | kubectl apply
-f
-
--dry-run
=
client
-o
yaml | kubectl apply
-f
-
else
else
...
...
deploy/cloud/helm/platform/components/operator/templates/_helpers.tpl
View file @
b8dc0150
...
@@ -85,6 +85,9 @@ Generate docker config json for registry credentials
...
@@ -85,6 +85,9 @@ Generate docker config json for registry credentials
*/
}
}
*/
}
}
{{- define "dynamo-operator.dockerconfig" -}}
{{- define "dynamo-operator.dockerconfig" -}}
{{- $server := .Values.dynamo.dockerRegistry.server -}}
{{- $server := .Values.dynamo.dockerRegistry.server -}}
{{- if or (eq $server "docker.io") (hasPrefix "docker.io/" $server) -}}
{{- $server = "https://index.docker.io/v1/" -}}
{{- end -}}
{{- $username := .Values.dynamo.dockerRegistry.username -}}
{{- $username := .Values.dynamo.dockerRegistry.username -}}
{{- $password := .Values.dynamo.dockerRegistry.password -}}
{{- $password := .Values.dynamo.dockerRegistry.password -}}
{{- if .Values.dynamo.dockerRegistry.passwordExistingSecretName -}}
{{- if .Values.dynamo.dockerRegistry.passwordExistingSecretName -}}
...
...
deploy/cloud/operator/internal/controller/dynamocomponent_controller.go
View file @
b8dc0150
...
@@ -663,9 +663,6 @@ func (r *DynamoComponentReconciler) getDockerRegistry(ctx context.Context, Dynam
...
@@ -663,9 +663,6 @@ func (r *DynamoComponentReconciler) getDockerRegistry(ctx context.Context, Dynam
dynamoRepositoryName
=
dockerRegistryConfig
.
DynamoComponentsRepositoryName
dynamoRepositoryName
=
dockerRegistryConfig
.
DynamoComponentsRepositoryName
}
}
dynamoRepositoryURI
:=
fmt
.
Sprintf
(
"%s/%s"
,
strings
.
TrimRight
(
dockerRegistryConfig
.
Server
,
"/"
),
dynamoRepositoryName
)
dynamoRepositoryURI
:=
fmt
.
Sprintf
(
"%s/%s"
,
strings
.
TrimRight
(
dockerRegistryConfig
.
Server
,
"/"
),
dynamoRepositoryName
)
if
strings
.
Contains
(
dockerRegistryConfig
.
Server
,
"docker.io"
)
{
dynamoRepositoryURI
=
fmt
.
Sprintf
(
"docker.io/%s"
,
dynamoRepositoryName
)
}
if
DynamoComponent
!=
nil
&&
DynamoComponent
.
Spec
.
DockerConfigJSONSecretName
!=
""
{
if
DynamoComponent
!=
nil
&&
DynamoComponent
.
Spec
.
DockerConfigJSONSecretName
!=
""
{
dockerRegistryConfig
.
SecretName
=
DynamoComponent
.
Spec
.
DockerConfigJSONSecretName
dockerRegistryConfig
.
SecretName
=
DynamoComponent
.
Spec
.
DockerConfigJSONSecretName
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment