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

[COR-166] Generate password and create secret #65

Merged
merged 14 commits into from
Jan 26, 2023
Merged

[COR-166] Generate password and create secret #65

merged 14 commits into from
Jan 26, 2023

Conversation

ianstanton
Copy link
Member

@ianstanton ianstanton commented Jan 25, 2023

Generate password for user postgres and store it in a kubernetes secret. This secret also contains connection info such as host, port, user, and uri. Example:

❯ k get secret sample-coredb-connection -o yaml
apiVersion: v1
data:
  host: c2FtcGxlLWNvcmVkYi1jb25uZWN0aW9uLmRlZmF1bHQuc3ZjLmNsdXN0ZXIubG9jYWw=
  password: eXI5eGE3UjU=
  port: NTQzMg==
  uri: cG9zdGdyZXNxbDovL3Bvc3RncmVzOnlyOXhhN1I1QHNhbXBsZS1jb3JlZGItY29ubmVjdGlvbi5kZWZhdWx0LnN2Yy5jbHVzdGVyLmxvY2FsOjU0MzI=
  user: cG9zdGdyZXM=
kind: Secret
metadata:
  creationTimestamp: "2023-01-26T15:49:25Z"
  labels:
    app: coredb
  name: sample-coredb-connection
  namespace: default
  ownerReferences:
  - apiVersion: coredb.io/v1alpha1
    controller: true
    kind: CoreDB
    name: sample-coredb
    uid: cbedc5c2-12a0-48f2-a7dd-8dcb35e8b531
  resourceVersion: "57082"
  uid: a3941387-5207-4008-b969-d0b3623a00c7
type: Opaque

@ianstanton ianstanton marked this pull request as ready for review January 26, 2023 16:25
@ianstanton
Copy link
Member Author

Opening up for review while I fix tests

Copy link
Contributor

@sjmiller609 sjmiller609 left a comment

Choose a reason for hiding this comment

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

just one nit pick

coredb-operator/src/secret.rs Outdated Show resolved Hide resolved
@ianstanton ianstanton merged commit 95a9294 into main Jan 26, 2023
@ianstanton ianstanton deleted the cor-166 branch January 26, 2023 20:48
sjmiller609 pushed a commit that referenced this pull request Dec 5, 2023
Signed-off-by: Ian Stanton <ian@coredb.io>
sjmiller609 added a commit that referenced this pull request Dec 5, 2023
* Create postgres-dashboard.yaml

* Update postgres-dashboard.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants