Skip to content

Commit

Permalink
fix: rename gitea secret for better description (#224)
Browse files Browse the repository at this point in the history
Signed-off-by: Bradon Kanyid (rattboi) <[email protected]>
  • Loading branch information
rattboi authored Apr 26, 2024
1 parent 0d546b2 commit 918f565
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 10 deletions.
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ idpbuilder get secrets
```

As described in the main readme file, the above command is equivalent to running:
```bash
kubectl -n argocd get secret argocd-initial-admin-secret
kubectl get secrets -n gitea gitea-admin-secret
kubectl get secrets -A -l cnoe.io/cli-secret=true
```

All ArgoCD applications should be synced and healthy. You can check them in the UI or

Expand Down
4 changes: 2 additions & 2 deletions examples/ref-implementation/backstage/manifests/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -420,11 +420,11 @@ spec:
data:
- secretKey: GITEA_USERNAME
remoteRef:
key: gitea-admin-secret
key: gitea-credential
property: username
- secretKey: GITEA_PASSWORD
remoteRef:
key: gitea-admin-secret
key: gitea-credential
property: password
---
apiVersion: networking.k8s.io/v1
Expand Down
2 changes: 1 addition & 1 deletion hack/gitea/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ test:

gitea:
admin:
existingSecret: gitea-admin-secret
existingSecret: gitea-credential
config:
database:
DB_TYPE: sqlite3
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/get/secrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ var SecretsCmd = &cobra.Command{
// well known secrets that are part of the core packages
var corePkgSecrets = map[string][]string{
"argocd": []string{"argocd-initial-admin-secret"},
"gitea": []string{"gitea-admin-secret"},
"gitea": []string{"gitea-credential"},
}

type TemplateData struct {
Expand Down
6 changes: 3 additions & 3 deletions pkg/cmd/get/secrets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ func TestPrintPackageSecrets(t *testing.T) {
listLabelSelector: []labels.Selector{selector("abc")},
getKeys: []client.ObjectKey{
{Name: "argocd-initial-admin-secret", Namespace: "argocd"},
{Name: "gitea-admin-secret", Namespace: "gitea"},
{Name: "gitea-credential", Namespace: "gitea"},
},
},
{
err: nil,
packages: []string{"argocd", "gitea"},
getKeys: []client.ObjectKey{
{Name: "argocd-initial-admin-secret", Namespace: "argocd"},
{Name: "gitea-admin-secret", Namespace: "gitea"},
{Name: "gitea-credential", Namespace: "gitea"},
},
},
{
Expand Down Expand Up @@ -110,7 +110,7 @@ func TestPrintAllPackageSecrets(t *testing.T) {
listLabelSelector: []labels.Selector{labels.NewSelector().Add(*r)},
getKeys: []client.ObjectKey{
{Name: "argocd-initial-admin-secret", Namespace: "argocd"},
{Name: "gitea-admin-secret", Namespace: "gitea"},
{Name: "gitea-credential", Namespace: "gitea"},
},
},
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/controllers/localbuild/gitea.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
const (
// hardcoded values from what we have in the yaml installation file.
giteaNamespace = "gitea"
giteaAdminSecret = "gitea-admin-secret"
giteaAdminSecret = "gitea-credential"
// this is the URL accessible outside cluster. resolves to localhost
giteaIngressURL = "%s://gitea.cnoe.localtest.me:%s"
// this is the URL accessible within cluster for ArgoCD to fetch resources.
Expand Down
4 changes: 2 additions & 2 deletions pkg/controllers/localbuild/resources/gitea/k8s/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -479,12 +479,12 @@ spec:
valueFrom:
secretKeyRef:
key: username
name: gitea-admin-secret
name: gitea-credential
- name: GITEA_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
key: password
name: gitea-admin-secret
name: gitea-credential
volumeMounts:
- name: init
mountPath: /usr/sbin
Expand Down

0 comments on commit 918f565

Please sign in to comment.