-
Notifications
You must be signed in to change notification settings - Fork 403
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
[FLINK-27613] Add label for the session job to help list the session … #265
Conversation
…jobs in the same session cluster
|
||
private static final ObjectMapper mapper = new ObjectMapper(); | ||
|
||
public static <T> T convertToTargetType(HasMetadata resource, Class<T> targetType) |
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 think we don’t need this utility class, ObjectMapper already has a convertValue method that does exactly this.
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.
👍🏻, Fixed
return resource; | ||
} | ||
|
||
private void patchInternalLabel(FlinkSessionJob flinkSessionJob) { |
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 think it would be clearer to call it simply setSessionTargetLabel
@@ -109,4 +109,36 @@ webhooks: | |||
operator: In | |||
values: [{{- range .Values.watchNamespaces }}{{ . | quote }},{{- end}}] | |||
{{- end }} | |||
{{- end }} | |||
--- |
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 think we should have a separate config flag to enable this. We should handle the validating and mutating webhooks independently of each other as some envs might want one but not the other.
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.
Agree, will do it
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.
Fixed
…jobs in the same session cluster
This PR is based on #215 but use the mutator webhook to do the same thing