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

Add support for KES #95

Merged
merged 1 commit into from
May 14, 2020
Merged

Add support for KES #95

merged 1 commit into from
May 14, 2020

Conversation

nitisht
Copy link
Contributor

@nitisht nitisht commented May 7, 2020

No description provided.

@nitisht nitisht marked this pull request as ready for review May 12, 2020 13:47
@nitisht nitisht changed the title [WIP] Add support for KES Add support for KES May 12, 2020
@nitisht
Copy link
Contributor Author

nitisht commented May 12, 2020

This still needs to add mcs image released after the PR minio/console#102

examples/minioinstance-kes.yaml Outdated Show resolved Hide resolved
examples/kes-config-secret.yaml Outdated Show resolved Hide resolved
examples/kes-config-secret.yaml Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
pkg/controller/cluster/kes-csr.go Outdated Show resolved Hide resolved
Comment on lines +16 to +19
mcshmacjwt: WU9VUkpXVFNJR05JTkdTRUNSRVQ= # base 64 encoded "YOURJWTSIGNINGSECRET" (echo -n 'YOURJWTSIGNINGSECRET' | base64)
mcspbkdfpassphrase: U0VDUkVU # base 64 encoded "SECRET" (echo -n 'SECRET' | base64)
mcspbkdfsalt: U0VDUkVU # base 64 encoded "SECRET" (echo -n 'SECRET' | base64)
mcssecretkey: WU9VUk1DU1NFQ1JFVA== # base 64 encoded "YOURMCSSECRET" (echo -n 'YOURMCSSECRET' | base64)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
mcshmacjwt: WU9VUkpXVFNJR05JTkdTRUNSRVQ= # base 64 encoded "YOURJWTSIGNINGSECRET" (echo -n 'YOURJWTSIGNINGSECRET' | base64)
mcspbkdfpassphrase: U0VDUkVU # base 64 encoded "SECRET" (echo -n 'SECRET' | base64)
mcspbkdfsalt: U0VDUkVU # base 64 encoded "SECRET" (echo -n 'SECRET' | base64)
mcssecretkey: WU9VUk1DU1NFQ1JFVA== # base 64 encoded "YOURMCSSECRET" (echo -n 'YOURMCSSECRET' | base64)
MCS_HMAC_JWT_SECRET: WU9VUkpXVFNJR05JTkdTRUNSRVQ= # base 64 encoded "YOURJWTSIGNINGSECRET" (echo -n 'YOURJWTSIGNINGSECRET' | base64)
MCS_PBKDF_PASSPHRASE: U0VDUkVU # base 64 encoded "SECRET" (echo -n 'SECRET' | base64)
MCS_PBKDF_SALT: U0VDUkVU # base 64 encoded "SECRET" (echo -n 'SECRET' | base64)
MCS_ACCESS_KEY: WU9VUk1DU0FDQ0VTUw== # base 64 encoded "YOURMCSACCESS" (echo -n 'YOURMCSACCESS' | base64)
MCS_SECRET_KEY: WU9VUk1DU1NFQ1JFVA== # base 64 encoded "YOURMCSSECRET" (echo -n 'YOURMCSSECRET' | base64)

if we rename the secrets to use the same name MCS is expectinng for environment variables then we can just load all of them in 1 line

apiVersion: v1
kind: Pod
metadata:
  name: mcs
spec:
  containers:
    - name: mcs
      ...
      envFrom:
      - secretRef:
          name: minio-mcs-secret

Otherwise we need to map the secrets to env variables, ie:

    env:
      - name: MCS_HMAC_JWT_SECRET
        valueFrom:
          secretKeyRef:
            name: minio-mcs-secret
            key: mcshmacjwt
      - name: MCS_PBKDF_PASSPHRASE
        valueFrom:
          secretKeyRef:
            name: minio-mcs-secret
            key: mcspbkdfpassphrase
   ...
   ..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a great idea, will help remove some code from Operator. But there is already a lot going on in this PR. IMO we can do this in a separate PR. I will send that soon

Copy link
Contributor

@Alevsk Alevsk May 13, 2020

Choose a reason for hiding this comment

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

sounds good nitisht

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated in #107

This PR also cleans up few helper methods.
@harshavardhana harshavardhana merged commit 07fd0af into minio:master May 14, 2020
@nitisht nitisht deleted the kes branch May 14, 2020 17:49
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.

None yet

4 participants