Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: rename gitea secret for better description #224

Merged
merged 2 commits into from
Apr 26, 2024

Conversation

rattboi
Copy link
Contributor

@rattboi rattboi commented Apr 26, 2024

partially fixes #216

This only covers the gitea secret renaming, as apparently the argocd one is generated by argo on installation, and is hardcoded to argocd-initial-admin-secret.

See here: https://github.com/argoproj/argo-cd/blob/0f11dfb5961361807962aafc68b11426b8a47490/cmd/argocd/commands/admin/initial_password.go#L16

There's some world where we could replicate the secret into one with a name we like better, but that sounds like a recipe for confusion.

partially fixes cnoe-io#216

This only covers the gitea secret renaming, as apparently the argocd one
is generated by argo on installation, and is hardcoded to
`argocd-initial-admin-secret`.

See here: https://github.com/argoproj/argo-cd/blob/0f11dfb5961361807962aafc68b11426b8a47490/cmd/argocd/commands/admin/initial_password.go#L16

There's some world where we could replicate the secret into one with a
name we like better, but that sounds like a recipe for confusion.

Signed-off-by: Bradon Kanyid (rattboi) <[email protected]>
@rattboi rattboi force-pushed the rattboi/align-secret-names branch from d701d50 to 2c0884f Compare April 26, 2024 02:04
@cmoulliard
Copy link
Contributor

Approved !

Copy link
Collaborator

@nabuskey nabuskey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. If you could fix up my mistake I'd appreciate it :)

CONTRIBUTING.md Outdated Show resolved Hide resolved
Signed-off-by: Bradon Kanyid (rattboi) <[email protected]>
@rattboi rattboi force-pushed the rattboi/align-secret-names branch from 637176f to a046fe2 Compare April 26, 2024 16:04
@nabuskey nabuskey merged commit 918f565 into cnoe-io:main Apr 26, 2024
1 check passed
@elamaran11
Copy link
Contributor

@rattboi @nabuskey Im getting below error while pull the latest code and deploy. Im not sure if this is related to this PR.

❯ k describe externalsecrets.external-secrets.io gitea-credentials -n backstage
Name:         gitea-credentials
Namespace:    backstage
Labels:       <none>
Annotations:  argocd.argoproj.io/tracking-id: backstage:external-secrets.io/ExternalSecret:backstage/gitea-credentials
API Version:  external-secrets.io/v1beta1
Kind:         ExternalSecret
Metadata:
  Creation Timestamp:  2024-04-26T18:55:27Z
  Generation:          1
  Resource Version:    3292
  UID:                 cc875094-b758-42ec-b20a-07265d00bd8e
Spec:
  Data:
    Remote Ref:
      Conversion Strategy:  Default
      Decoding Strategy:    None
      Key:                  gitea-credential
      Metadata Policy:      None
      Property:             username
    Secret Key:             GITEA_USERNAME
    Remote Ref:
      Conversion Strategy:  Default
      Decoding Strategy:    None
      Key:                  gitea-credential
      Metadata Policy:      None
      Property:             password
    Secret Key:             GITEA_PASSWORD
  Refresh Interval:         0
  Secret Store Ref:
    Kind:  ClusterSecretStore
    Name:  gitea
  Target:
    Creation Policy:  Owner
    Deletion Policy:  Retain
    Name:             gitea-credentials
Status:
  Conditions:
    Last Transition Time:  2024-04-26T18:55:27Z
    Message:               could not get secret data from provider
    Reason:                SecretSyncedError
    Status:                False
    Type:                  Ready
Events:
  Type     Reason        Age                 From              Message
  ----     ------        ----                ----              -------
  Warning  UpdateFailed  40s (x14 over 85s)  external-secrets  error retrieving secret at .data[0], key: gitea-credential, err: secrets "gitea-credential" not found

@rattboi
Copy link
Contributor Author

rattboi commented Apr 26, 2024

are you using a rebuilt idpbuilder binary, or just the ref-implementation package against the old binary? The secret is provisioned by idpbuilder itself, and I would say this is a breaking change.

@nabuskey
Copy link
Collaborator

Yea just need to update the secret name in the example.

@elamaran11
Copy link
Contributor

I think you both are right. I didnt rebuild the binary, let me try that out! Thanks!

@elamaran11
Copy link
Contributor

@nabuskey Could we have a patch release for this breaking change?

@nimakaviani
Copy link
Contributor

nimakaviani commented Apr 26, 2024

+1 on a micro release if the latest binary doesnt go with the ref implementation.

Also another good reason to separate the examples repo, so we can cut versions both on the binary and the examples.

@nabuskey
Copy link
Collaborator

Yeah we really need to decouple the two and pin to a version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The secret returned by the command "idpbuilder get secrets" should also include the username for argocd
5 participants