728x90
반응형
1. Secrets 객체로 저장된 리포지토리 정보를 확인합니다.
~/environment $ kubectl get secrets -n argocd
NAME TYPE DATA AGE
argocd-application-controller-token-8mtfb kubernetes.io/service-account-token 3 80d
argocd-dex-server-token-jzh8d kubernetes.io/service-account-token 3 80d
argocd-initial-admin-secret Opaque 1 80d
argocd-redis-token-htq4s kubernetes.io/service-account-token 3 80d
argocd-secret Opaque 15 80d
argocd-server-token-6ljsp kubernetes.io/service-account-token 3 80d
default-token-7xkxf kubernetes.io/service-account-token 3 80d
repo-1467931201 Opaque 4 80d
repo-18701496 Opaque 4 37d
repo-2029740161 Opaque 4 2d16h
repo-2449069583 Opaque 4 80d
repo-2756299077 Opaque 4 27d
repo-3116005398 Opaque 4 39d
repo-3767823961 Opaque 4 39d
repo-4219629764 Opaque 4 37d
~/environment $
2. repo-xxxxx로 된 Secrets의 내용을 확인합니다.
8021:~/environment $ kubectl get secret repo-1467931201 -n argocd -o yaml
apiVersion: v1
data:
password: d2pzdGtzdGxmMTI=
type: Z2l0
url: aHR0cHM6Ly9naXRsYWIubW5nLnJlZmluZWh1Yi5jb20vZGV2b3BzL3JlZmluZS13b3JrL2xzci1ncm50LWFwaS5naXQ=
username: amVua2lucw==
kind: Secret
metadata:
annotations:
managed-by: argocd.argoproj.io
creationTimestamp: "2021-09-16T15:33:44Z"
labels:
argocd.argoproj.io/secret-type: repository
name: repo-1467931201
namespace: argocd
resourceVersion: "28308"
uid: 731edae6-f2cf-46c7-9150-49ef0ebdabbe
type: Opaque
~/environment $
3. url에 나온 값을 base64로 디코딩해서 git 주소를 확인합니다.
~/environment $ echo aHR0cHM6Ly9naXRsYWIubW5nLnJlZmluZWh1Yi5jb20vZGV2b3BzL3JlZmluZS13b3JrL2xzci1ncm50LWFwaS5naXQ= | base64 -d
https://gitlab.test.com/devops/test.git
4. 3번을 방법은 통해서 비밀번호를 변경하고자 리포지토리를 찾고 해당 ConfigMap에 명시된 password 값을 업데이트 합니다. (base64로 인코딩한 값으로 넣어줍니다)
e.g. 비밀번호를 asdf1234로 변경할 경우 password 값에 YXNkZjEyMzQK를 넣어줍니다.
~/environment $ echo asdf1234 | base64
YXNkZjEyMzQK
~/environment $
728x90
300x250