registry-image-resource
registry-image-resource copied to clipboard
Private registry with kubernetes credentials not working
Hello there, with the following pipeline.yml
---
resources:
- name: sample-repository
type: git
source:
uri: <REPO>
private_key: <PRIVATE_KEY>
- name: sample-image
type: registry-image
source:
repository: <PRIVATE_REGISTRY>
username: <K8S-SECRET>
password: <K8S-SECRET>
jobs:
- name: build-publish-image
plan:
- get: sample-repository
passed:
- tests
trigger: true
- config:
container_limits: {}
image_resource:
source:
repository: vito/oci-build-task
type: registry-image
inputs:
- name: sample-repository
path: .
outputs:
- name: image
platform: linux
run:
path: build
privileged: true
task: build
- params:
image: image/image.tar
put: image
we are facing the following issue:
- If I use the user/pass as a plain text on the registry-image, it works like charm
- If I use a kubernetes secret, the put step fails due to a 401 (unauthorized) error.
Some key points:
- I can guarantee that the secret is ok (base64 encoded, so, when I decode it, it is the desired user/pass)
- I can successfully publish the image using the
docker-image-resource
with the same k8s user/pass
Hi, is this still an issue?
While you were using docker-image-resource
with k8s user/pass, were the credentials plain text or k8s secret? Feels like it is not an issue of this resource but the problem of k8s credeitial manager of concourse.