-
Notifications
You must be signed in to change notification settings - Fork 18
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
[WIP] fix: moving the hardcoded configs in KFPv2 Launcher to configmap. Fixes #494 #191
Conversation
Signed-off-by: Achyut Madhusudan <amadhusu@redhat.com>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: amadhusu The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
backend/src/v2/config/env.go
Outdated
configMapName = "kfp-launcher" | ||
defaultPipelineRoot = "minio://mlpipeline/v2/artifacts" | ||
configKeyDefaultPipelineRoot = "defaultPipelineRoot" | ||
minioAuthConfig = "mlpipeline-minio-artifact" | ||
configKeyMinioAuthConfig = "minioAuthConfig" | ||
minioAuthConfigAccessKey = "accesskey" | ||
configMinioAuthConfigAccessKey = "minioAuthConfigAccessKey" | ||
minioAuthConfigSecretKey = "secretkey" | ||
configMinioAuthConfigSecretKey = "minioAuthConfigSecretKey" | ||
defaultMinioEndpoint = "minio-service.kubeflow:9000" | ||
configDefaultMinioEndpoint = "defaultMinioEndpoint" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm finding the naming here to be very hard to digest, can you organize this differently
group the configs
together, space them apart, etc.
-
note also that
minioAuthConfigAccessKey
andminioAuthConfigSecretKey
consider what they are being used for, for example:defaultMinioSecretAccessKeyKey
anddefaultMinioSecretSecretKeyKey
, this may look silly with the double usage of "secret" and "key", but it's more descriptive, as these are fields found in a k8s secret. -
minioAuthConfig can be better named (I know this one comes from upstream but it's confusing), it's a default k8s secret name, something like
defaultMiniotAuthSecretName
is way more helpful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@HumairAK See if the changes here are easier to read now
backend/src/v2/config/env.go
Outdated
if c == nil || c.data[configKeyMinioAuthConfig] == "" { | ||
return minioAuthConfig, minioAuthConfigAccessKey, minioAuthConfigSecretKey | ||
} | ||
return c.data[configKeyMinioAuthConfig], c.data[configMinioAuthConfigAccessKey], c.data[configMinioAuthConfigSecretKey] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if these fields are not present?
- c.data[configMinioAuthConfigAccessKey]
- c.data[configMinioAuthConfigSecretKey]
|
||
accessKey := minioAuthConfigAccessKey | ||
secretKey := minioAuthConfigSecretKey |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not fetching the creds from the secret anymore , we need to retain the original behavior if the credentials aren't specified in a config
cfg, err := config.FromConfigMap(ctx, k8sClient, namespace) | ||
if err != nil { | ||
return nil, err | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the original issue the recommendation was to do this in Execute within the launcher, and pass the creds down to OpenBucket, I agree with this approach more because "FromConfigMap" is a kfp-launcher concern, not object store, so we should not be reading kfp-launcher configs within the objectstore package.
return nil, err | ||
} | ||
_, minioAuthConfigAccessKey, minioAuthConfigSecretKey := cfg.MinioAuthConfig() | ||
defaultMinioEndpointInMultiUserMode := cfg.MinioEndpoint() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The double calls for the same thing seem weird to me for retrieving the minio endpoint, how about we just add a field to the Config
struct at the top called endpoint
, in kfp-launcher execute fetch it via MinioEndpoint()
, in OpenBucket, check fo this field in bucketconfig
if it doesn't exist, default to old behavior
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind, I'm not sure about this one, adding fields in a generic way to the config struct is not completely clear, there is tight integration with minio but there is still "some" support for other storage providers (see ParseBucketConfig
), but there doesn't seem to be a way to provide credentials for them, so I'm not sure if it makes sense to add things like "Region" (needed by aws s3 for example) or not to that struct.
Signed-off-by: Achyut Madhusudan <amadhusu@redhat.com>
sorry bad robot |
Closing this PR as it has been moved to here |
Has this been resolved? I can connect to my external minio to write manifects, but for some logs it still tries to write to the internal minio? |
Which issue is resolved by this Pull Request:
Resolves #494
Description of your changes:
Followed Option 1 in the suggestion mentioned in kubeflow/pipelines/issues/9689
Environment tested:
Checklist: