gyfora commented on code in PR #184:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/184#discussion_r866630569
##########
helm/flink-kubernetes-operator/templates/webhook.yaml:
##########
@@ -83,7 +83,7 @@ metadata:
cert-manager.io/inject-ca-from: {{ .Release.Namespace
}}/flink-operator-serving-cert
name: flink-operator-{{ .Release.Namespace }}-webhook-configuration
webhooks:
-- name: vflinkdeployments.flink.apache.org
+- name: flinkoperator.flink.apache.org
Review Comment:
Could we simply name this `flinkoperator-webhook` or something like this?
##########
flink-kubernetes-webhook/src/main/java/org/apache/flink/kubernetes/operator/admission/FlinkValidator.java:
##########
@@ -20,41 +20,74 @@
import
org.apache.flink.kubernetes.operator.admission.admissioncontroller.NotAllowedException;
import
org.apache.flink.kubernetes.operator.admission.admissioncontroller.Operation;
import
org.apache.flink.kubernetes.operator.admission.admissioncontroller.validation.Validator;
+import org.apache.flink.kubernetes.operator.crd.CrdConstants;
import org.apache.flink.kubernetes.operator.crd.FlinkDeployment;
+import org.apache.flink.kubernetes.operator.crd.FlinkSessionJob;
import org.apache.flink.kubernetes.operator.validation.FlinkResourceValidator;
import com.fasterxml.jackson.databind.ObjectMapper;
-import io.fabric8.kubernetes.api.model.GenericKubernetesResource;
+import io.fabric8.kubernetes.api.model.GroupVersionKind;
+import io.fabric8.kubernetes.api.model.KubernetesResource;
+import io.fabric8.kubernetes.client.DefaultKubernetesClient;
+import io.fabric8.kubernetes.client.KubernetesClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Optional;
import java.util.Set;
/** Validator for FlinkDeployment creation and updates. */
-public class FlinkValidator implements Validator<GenericKubernetesResource> {
+public class FlinkValidator implements Validator<KubernetesResource> {
Review Comment:
I don't quite understand why it would be somethis generic and sometimes
plain KuberentesResource but safest to keep it as you have done now. We anyways
map it to our custom classes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]