Skip to content

Commit 2e448fa

Browse files
committed
[vSphere][RKE2] Fix docker.io private registry authentication
Signed-off-by: Andrea Mazzotti <[email protected]>
1 parent 3335f62 commit 2e448fa

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

.github/workflows/run-vsphere-tests.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ env:
2424
GINKGO_LABEL_FILTER: "vsphere"
2525
TAG: v0.0.1
2626
DOCKER_REGISTRY_TOKEN: ${{ secrets.DOCKER_REGISTRY_TOKEN }}
27+
DOCKER_REGISTRY_USERNAME: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
2728
DOCKER_REGISTRY_CONFIG: ${{ secrets.DOCKER_REGISTRY_CONFIG }}
2829
GINKGO_NODES: 2
2930

examples/clusterclasses/vsphere/rke2/clusterclass-rke2-example.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ spec:
323323
valueFrom:
324324
template: |-
325325
{{- if .dockerAuthSecret }}
326-
"docker.io":
326+
"registry-1.docker.io":
327327
authSecret:
328328
name: {{ .dockerAuthSecret }}
329329
namespace: {{ .builtin.cluster.namespace }}
@@ -360,7 +360,7 @@ spec:
360360
valueFrom:
361361
template: |-
362362
{{- if .dockerAuthSecret }}
363-
"docker.io":
363+
"registry-1.docker.io":
364364
authSecret:
365365
name: {{ .dockerAuthSecret }}
366366
namespace: {{ .builtin.cluster.namespace }}

test/e2e/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ variables:
123123
TURTLES_VERSION: "v0.0.1" # Version of the turtles image to use
124124
TURTLES_IMAGE: "ghcr.io/rancher/turtles-e2e" # Rancher turtles image to use. It is pre-loaded from local docker registry in kind environment, but expected to be pulled and available in `eks` cluster environment
125125
ARTIFACTS_FOLDER: "_artifacts" # Folder for the e2e run artifacts collection with crust-gather.
126-
SECRET_KEYS: "NGROK_AUTHTOKEN,NGROK_API_KEY,RANCHER_HOSTNAME,RANCHER_PASSWORD,CAPG_ENCODED_CREDS,AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,AZURE_SUBSCRIPTION_ID,AZURE_CLIENT_ID,AZURE_CLIENT_SECRET,AZURE_TENANT_ID,GCP_PROJECT,GCP_NETWORK_NAME,VSPHERE_TLS_THUMBPRINT,VSPHERE_SERVER,VSPHERE_DATACENTER,VSPHERE_DATASTORE,VSPHERE_FOLDER,VSPHERE_TEMPLATE,VSPHERE_NETWORK,VSPHERE_RESOURCE_POOL,VSPHERE_USERNAME,VSPHERE_PASSWORD,VSPHERE_KUBE_VIP_IP_KUBEADM,VSPHERE_KUBE_VIP_IP_RKE2" # Is a list of environment variable keys, values of which would be excluded from collected artifacts data.
126+
SECRET_KEYS: "NGROK_AUTHTOKEN,NGROK_API_KEY,RANCHER_HOSTNAME,RANCHER_PASSWORD,CAPG_ENCODED_CREDS,AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,AZURE_SUBSCRIPTION_ID,AZURE_CLIENT_ID,AZURE_CLIENT_SECRET,AZURE_TENANT_ID,GCP_PROJECT,GCP_NETWORK_NAME,VSPHERE_TLS_THUMBPRINT,VSPHERE_SERVER,VSPHERE_DATACENTER,VSPHERE_DATASTORE,VSPHERE_FOLDER,VSPHERE_TEMPLATE,VSPHERE_NETWORK,VSPHERE_RESOURCE_POOL,VSPHERE_USERNAME,VSPHERE_PASSWORD,VSPHERE_KUBE_VIP_IP_KUBEADM,VSPHERE_KUBE_VIP_IP_RKE2,DOCKER_REGISTRY_TOKEN,DOCKER_REGISTRY_USERNAME,DOCKER_REGISTRY_CONFIG" # Is a list of environment variable keys, values of which would be excluded from collected artifacts data.
127127
```
128128
129129
## Artifacts collection

test/e2e/config/operator.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ variables:
3737
SKIP_RESOURCE_CLEANUP: "false"
3838
SKIP_DELETION_TEST: "false"
3939
ARTIFACTS_FOLDER: "_artifacts"
40-
SECRET_KEYS: "NGROK_AUTHTOKEN,NGROK_API_KEY,RANCHER_HOSTNAME,RANCHER_PASSWORD,CAPG_ENCODED_CREDS,AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,AZURE_SUBSCRIPTION_ID,AZURE_CLIENT_ID,AZURE_CLIENT_SECRET,AZURE_TENANT_ID,GCP_PROJECT,GCP_NETWORK_NAME,GCP_IMAGE_ID,VSPHERE_TLS_THUMBPRINT,VSPHERE_SERVER,VSPHERE_DATACENTER,VSPHERE_DATASTORE,VSPHERE_FOLDER,VSPHERE_TEMPLATE,VSPHERE_NETWORK,VSPHERE_RESOURCE_POOL,VSPHERE_USERNAME,VSPHERE_PASSWORD,VSPHERE_KUBE_VIP_IP_KUBEADM,VSPHERE_KUBE_VIP_IP_RKE2"
40+
SECRET_KEYS: "NGROK_AUTHTOKEN,NGROK_API_KEY,RANCHER_HOSTNAME,RANCHER_PASSWORD,CAPG_ENCODED_CREDS,AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,AZURE_SUBSCRIPTION_ID,AZURE_CLIENT_ID,AZURE_CLIENT_SECRET,AZURE_TENANT_ID,GCP_PROJECT,GCP_NETWORK_NAME,GCP_IMAGE_ID,VSPHERE_TLS_THUMBPRINT,VSPHERE_SERVER,VSPHERE_DATACENTER,VSPHERE_DATASTORE,VSPHERE_FOLDER,VSPHERE_TEMPLATE,VSPHERE_NETWORK,VSPHERE_RESOURCE_POOL,VSPHERE_USERNAME,VSPHERE_PASSWORD,VSPHERE_KUBE_VIP_IP_KUBEADM,VSPHERE_KUBE_VIP_IP_RKE2,DOCKER_REGISTRY_TOKEN,DOCKER_REGISTRY_USERNAME,DOCKER_REGISTRY_CONFIG"
4141

4242
# Kubernetes Configuration
4343
KUBERNETES_VERSION: "v1.31.4"
@@ -117,6 +117,7 @@ variables:
117117

118118
# Credentials used to pull images from docker.io
119119
DOCKER_REGISTRY_TOKEN: ""
120+
DOCKER_REGISTRY_USERNAME: ""
120121
# The '.dockerconfigjson' value for the dockerconfigjson Secret
121122
# See: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#registry-secret-existing-credentials
122123
# This can be used to configure a downstream cluster with a imagePullSecret.

test/e2e/data/cluster-templates/vsphere-rke2-topology.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ metadata:
1515
namespace: '${NAMESPACE}'
1616
type: Opaque
1717
stringData:
18-
identity-token: "${DOCKER_REGISTRY_TOKEN}"
18+
username: "${DOCKER_REGISTRY_USERNAME}"
19+
password: "${DOCKER_REGISTRY_TOKEN}"
1920
---
2021
apiVersion: cluster.x-k8s.io/v1beta1
2122
kind: Cluster

0 commit comments

Comments
 (0)