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

feat: Add a secret to use with seldon deployments #27

Merged
merged 2 commits into from
Mar 18, 2022

Conversation

ca-scribner
Copy link
Contributor

Fixes #26. Charm creates a secret with mlflow's s3 credentials called {charm_name}-seldon-init-container-s3-credentials. This secret is formatted as needed for a Seldon Deployment Init Container.

Also:

  • adds tests for the new secret
  • refactors some secret creation to make the main function of the charm read easier
  • removes an unused dependency from requirements.txt

Copy link
Contributor

@DomFleischmann DomFleischmann left a comment

Choose a reason for hiding this comment

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

Looks very promising, I'm just a bit confused about how all of this will connect.

return _b64_encode_dict(minio_credentials)


def _seldon_credentials_dict(obj_storage):
Copy link
Contributor

Choose a reason for hiding this comment

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

how does do the seldon-init containers get these credentials? Specially when the seldon deployment is in a different namespace.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For now, only with some extra steps :( There's more context in this comment. This is more a stop-gap fix until we have a way of injecting secrets into everyone's namespaces.

This first step was decided on with @Barteus so that:

  • for deployments with Seldon and MLFlow in the same namespace, SeldonDeployments work easily by referencing this secret directly
  • for deployments with Seldon and MLFlow in different namespaces, SeldonDeployments cannot reference this secret directly but at least there's a "template" secret in mlflow's namespace that is easy to copy as needed

As soon as we can inject secrets into user namespaces, we remove this secret.

After talking with @Barteus, this secret means if seldon

@DomFleischmann
Copy link
Contributor

Looks good, can you resolve the conflict @ca-scribner ?

Fixes #26.  Charm creates a secret with mlflow's s3 credentials called  `{charm_name}-seldon-init-container-s3-credentials`.  This secret is formatted as needed for a [Seldon Deployment Init Container](https://docs.seldon.io/projects/seldon-core/en/latest/servers/kfserving-storage-initializer.html#create-a-secret-containing-the-environment-variables).

Also:
* adds tests for the new secret
* refactors some secret creation to make the main function of the charm read easier
* removes an unused dependency from requirements.txt
@ca-scribner ca-scribner force-pushed the KF-219-bugfix-for-mlflow-seldon-secrets branch from d4ae2e2 to 39a3726 Compare March 18, 2022 13:51
@ca-scribner ca-scribner merged commit e207442 into master Mar 18, 2022
@ca-scribner ca-scribner deleted the KF-219-bugfix-for-mlflow-seldon-secrets branch March 22, 2022 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add/update seldon-init-container-secret for seldon
2 participants