-
Notifications
You must be signed in to change notification settings - Fork 2k
Central driver POC #12269
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
Closed
Closed
Central driver POC #12269
Changes from all commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
bb0b8ea
Central driver POC https://github.com/kubeflow/pipelines/pull/12023
934655c
- add pipeline flow details to contribution
7e77e29
- rebase brunch
395c8c1
- remove redundant regenerate code
c2c0a49
- rebase master
037436f
- merge tests
38cbe18
- update branch
db3ad72
Fixes for review comments, part 1 (easy ones)
f9d0537
make driver-plugin image kustimizable
e536640
Mount certificate to executor-plugin based drivers
8e7a95d
merge
77d9f89
debug kfp-api-tls-cert creation and availability
d19d099
add necessary sa to profile namespaces
4d54eca
Fix failing driver task log capturing in e2e tests
5c7b636
- rework CA cert mounting
0534993
- add list events to e2e tests
1feb4c3
- create argo resources in end-user profiles
13d28a0
- remove debugging tls in tests
d1261b5
- add debug logs to e2e
9793c72
- add debug logs to e2e
40aa133
update from master
a630b38
update from master
77ead11
create executor-plugin SA, role per profile
d34b980
create executor-plugin SA, role per profile
a271f45
- create executor-plugin SA, role per profile
33d46e8
- make driver-plugin securityContext PodSecurity restricted compliant
64c5bda
- pass mlmdtls parameter to launcher cmd args
3ba6e0b
- debug e2e & upgrade
8a320dc
Merge commit 'origin/master~1' into central-driver-poc
ae3a5fa
Merge branch 'master' into central-driver-poc
22f9270
- fix after merge
804c668
- reduce agent CPU requests for testing cluster
91a5cd8
- remove debug logs
61a6c39
Merge branch 'master' into central-driver-poc
ca7eb10
- store driver logs into artifact store
b422c55
Store driver logs in artifact storage and display container driver lo…
aa1abdb
apply formatting to frontend
c70b855
fix linter errors
1ae6c97
fix tests
4754bf9
add additional rbac
54d186a
Merge branch 'master' into central-driver-poc
f437053
fix error message
f1bd7cc
print events
01b0755
remove debug logs
93fabba
Prevent log file race condition in for loop by adding per-request mil…
dc4f0ff
Merge branch 'master' into central-driver-poc
1716f32
Move driver logs code to React Query v5
1f023c5
fix linter errors
209ecc7
fix workflow-compiler tests after merge
33f2cad
skip unit test: envs now defined in manifests, verified in existed wo…
11d59f2
fix react driver logs query
ddf186d
add kfp envs
9118534
add roles nececcary rbac
f75f873
Merge branch 'master' into central-driver-poc
a85d3de
add kfo envs to tests
70d33ac
add kfo envs to tests
2e5b30c
- fix plugin cm
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
.github/resources/manifests/base/driver-plugin-cm-path.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| name: ml-pipeline-driver-agent | ||
| data: | ||
| sidecar.container: | | ||
| name: driver-plugin | ||
| image: kind-registry:5000/driver:latest | ||
| imagePullPolicy: IfNotPresent | ||
| env: | ||
| - name: LOG_ACCESS_KEY | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: mlpipeline-minio-artifact | ||
| key: accesskey | ||
| - name: LOG_SECRET_KEY | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: mlpipeline-minio-artifact | ||
| key: secretkey | ||
| ports: | ||
| - containerPort: 8080 | ||
| resources: | ||
| requests: | ||
| cpu: 100m | ||
| memory: 256Mi | ||
| limits: | ||
| cpu: 500m | ||
| memory: 512Mi | ||
| securityContext: | ||
| runAsNonRoot: true | ||
| runAsUser: 65534 | ||
| allowPrivilegeEscalation: false | ||
| capabilities: | ||
| drop: | ||
| - ALL | ||
| seccompProfile: | ||
| type: RuntimeDefault | ||
| volumeMounts: | ||
| - name: var-run-argo | ||
| mountPath: /kfp/log | ||
| readOnly: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
.github/resources/manifests/standalone/tls-enabled/driver-plugin-cm-path.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| name: ml-pipeline-driver-agent | ||
| data: | ||
| sidecar.container: | | ||
| name: driver-plugin | ||
| image: kind-registry:5000/driver:latest | ||
| imagePullPolicy: IfNotPresent | ||
| ports: | ||
| - containerPort: 8080 | ||
| env: | ||
| - name: LOG_ACCESS_KEY | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: mlpipeline-minio-artifact | ||
| key: accesskey | ||
| - name: LOG_SECRET_KEY | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: mlpipeline-minio-artifact | ||
| key: secretkey | ||
| resources: | ||
| requests: | ||
| cpu: 100m | ||
| memory: 256Mi | ||
| limits: | ||
| cpu: 500m | ||
| memory: 512Mi | ||
| securityContext: | ||
| runAsNonRoot: true | ||
| runAsUser: 65534 | ||
| allowPrivilegeEscalation: false | ||
| capabilities: | ||
| drop: | ||
| - ALL | ||
| seccompProfile: | ||
| type: RuntimeDefault | ||
| volumeMounts: | ||
| - name: argo-workflows-agent-ca-certificates | ||
| mountPath: /kfp/certs | ||
| readOnly: true | ||
| - name: var-run-argo | ||
| mountPath: /kfp/log | ||
| readOnly: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -27,7 +27,7 @@ RUN GO111MODULE=on go mod download | |||||||||
|
|
||||||||||
| COPY . . | ||||||||||
|
|
||||||||||
|
||||||||||
| # Note: driver build path was reorganized from ./backend/src/v2/cmd/driver/*.go | |
| # to ./backend/src/driver/*.go as part of backend driver code restructuring. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| package util | ||
|
|
||
| import ( | ||
| "context" | ||
| "fmt" | ||
| "io" | ||
| "os" | ||
|
|
||
| "github.com/sirupsen/logrus" | ||
| ) | ||
|
|
||
| type CtxKey string | ||
|
|
||
| const ( | ||
| contextLoggerKey CtxKey = "driver_log_key" | ||
| ) | ||
|
|
||
| func newFileLogger(logFile string) (*logrus.Logger, io.Closer, error) { | ||
| f, err := os.Create(logFile) | ||
| if err != nil { | ||
| return nil, nil, err | ||
| } | ||
|
|
||
| logger := logrus.New() | ||
| logger.Out = io.MultiWriter(os.Stdout, f) | ||
| logger.Formatter = &logrus.TextFormatter{} | ||
| return logger, f, nil | ||
| } | ||
|
|
||
| // WithExistingLogger For testing only | ||
| func WithExistingLogger(ctx context.Context, logger *logrus.Logger) context.Context { | ||
| return context.WithValue(ctx, contextLoggerKey, logger) | ||
| } | ||
|
|
||
| func WithLogger(ctx context.Context, logFile string) (context.Context, io.Closer, error) { | ||
| if ctx == nil { | ||
| return nil, nil, fmt.Errorf( | ||
| "error during creation of the logger for logId: %v. ctx can not be nil", | ||
| logFile, | ||
| ) | ||
| } | ||
|
|
||
| if GetLoggerFrom(ctx) != nil { | ||
| return nil, nil, fmt.Errorf("logger already exists in context") | ||
| } | ||
|
|
||
| logger, f, err := newFileLogger(logFile) | ||
| if err != nil { | ||
| return nil, nil, fmt.Errorf( | ||
| "error during creation of the logger for logId: %v details: %w", | ||
| logFile, | ||
| err, | ||
| ) | ||
| } | ||
|
|
||
| ctx = context.WithValue(ctx, contextLoggerKey, logger) | ||
|
|
||
| return ctx, f, nil | ||
| } | ||
|
|
||
| func GetLoggerFrom(ctx context.Context) *logrus.Logger { | ||
| v := ctx.Value(contextLoggerKey) | ||
| if v == nil { | ||
| return nil | ||
| } | ||
|
|
||
| logger, ok := v.(*logrus.Logger) | ||
| if !ok { | ||
| return nil | ||
| } | ||
|
|
||
| return logger | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 container name 'driver-plugin' is hardcoded. Consider extracting this to a constant or configuration variable to ensure consistency across the codebase.