This is an automated email from the ASF dual-hosted git repository.

gyfora pushed a commit to branch release-0.1
in repository https://gitbox.apache.org/repos/asf/flink-kubernetes-operator.git

commit 40726ed9100bf5a0e80515dc407361d09a82d5ea
Author: Gyula Fora <[email protected]>
AuthorDate: Mon Mar 28 09:31:53 2022 +0200

    Revert "[FLINK-26785] Add FlinkSessionJob CRD"
    
    This reverts commit e68957365252b10f365a5b9e46fb09394532ec4b.
---
 docs/content/docs/custom-resource/reference.md     |  31 -----
 examples/basic-session-job.yaml                    |  29 -----
 flink-kubernetes-operator/pom.xml                  |   1 -
 ...essionJobSpec.java => FlinkDeploymentList.java} |  25 +---
 .../kubernetes/operator/crd/FlinkSessionJob.java   |  46 --------
 .../FlinkSessionJobReconciliationStatus.java       |  45 --------
 .../operator/crd/status/FlinkSessionJobStatus.java |  39 -------
 .../crds/flinksessionjobs.flink.apache.org-v1.yml  | 127 ---------------------
 pom.xml                                            |   1 -
 9 files changed, 4 insertions(+), 340 deletions(-)

diff --git a/docs/content/docs/custom-resource/reference.md 
b/docs/content/docs/custom-resource/reference.md
index 9880eec..caab47d 100644
--- a/docs/content/docs/custom-resource/reference.md
+++ b/docs/content/docs/custom-resource/reference.md
@@ -58,16 +58,6 @@ This page serves as a full reference for FlinkDeployment 
custom resource definit
 | restartNonce | java.lang.Long | Nonce used to manually trigger restart for 
the cluster. In order to trigger restart, change  the number to anything other 
than the current value. |
 | logConfiguration | java.util.Map<java.lang.String,java.lang.String> | Log 
configuration overrides for the Flink deployment. Format logConfigFileName ->  
configContent. |
 
-### FlinkSessionJobSpec
-**Class**: org.apache.flink.kubernetes.operator.crd.spec.FlinkSessionJobSpec
-
-**Description**: Spec that describes a Flink session job.
-
-| Parameter | Type | Docs |
-| ----------| ---- | ---- |
-| clusterId | java.lang.String | The cluster id of the target session cluster. 
When deployed using the operator the cluster id  is the name of the deployment. 
|
-| job | org.apache.flink.kubernetes.operator.crd.spec.JobSpec | A 
specification of a job . |
-
 ### FlinkVersion
 **Class**: org.apache.flink.kubernetes.operator.crd.spec.FlinkVersion
 
@@ -171,27 +161,6 @@ This page serves as a full reference for FlinkDeployment 
custom resource definit
 | jobManagerDeploymentStatus | 
org.apache.flink.kubernetes.operator.observer.JobManagerDeploymentStatus | Last 
observed status of the JobManager deployment. |
 | reconciliationStatus | 
org.apache.flink.kubernetes.operator.crd.status.ReconciliationStatus | Status 
of the last reconcile operation. |
 
-### FlinkSessionJobReconciliationStatus
-**Class**: 
org.apache.flink.kubernetes.operator.crd.status.FlinkSessionJobReconciliationStatus
-
-**Description**: Status of the last reconcile step for the session job.
-
-| Parameter | Type | Docs |
-| ----------| ---- | ---- |
-| success | boolean | True if last reconciliation step was successful. |
-| error | java.lang.String | If success == false, error information about the 
reconciliation failure. |
-| flinkSessionJobSpec | 
org.apache.flink.kubernetes.operator.crd.spec.FlinkSessionJobSpec | Last 
reconciled job spec. Used to decide whether further reconciliation steps are 
necessary. |
-
-### FlinkSessionJobStatus
-**Class**: 
org.apache.flink.kubernetes.operator.crd.status.FlinkSessionJobStatus
-
-**Description**: Last observed status of the Flink Session job.
-
-| Parameter | Type | Docs |
-| ----------| ---- | ---- |
-| jobStatus | org.apache.flink.kubernetes.operator.crd.status.JobStatus | Last 
observed status of the job. |
-| reconciliationStatus | 
org.apache.flink.kubernetes.operator.crd.status.FlinkSessionJobReconciliationStatus
 | Status of the last reconcile operation. |
-
 ### JobStatus
 **Class**: org.apache.flink.kubernetes.operator.crd.status.JobStatus
 
diff --git a/examples/basic-session-job.yaml b/examples/basic-session-job.yaml
deleted file mode 100644
index e2b2401..0000000
--- a/examples/basic-session-job.yaml
+++ /dev/null
@@ -1,29 +0,0 @@
-################################################################################
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you under the Apache License, Version 2.0 (the
-#  "License"); you may not use this file except in compliance
-#  with the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-# limitations under the License.
-################################################################################
-
-apiVersion: flink.apache.org/v1alpha1
-kind: FlinkSessionJob
-metadata:
-  namespace: default
-  name: basic-session-job-example
-spec:
-  clusterId: basic-session-example
-  job:
-    jarURI: local:///opt/flink/examples/streaming/StateMachineExample.jar
-    parallelism: 2
-    upgradeMode: stateless
diff --git a/flink-kubernetes-operator/pom.xml 
b/flink-kubernetes-operator/pom.xml
index 6d11b04..94eff74 100644
--- a/flink-kubernetes-operator/pom.xml
+++ b/flink-kubernetes-operator/pom.xml
@@ -144,7 +144,6 @@ under the License.
                                     
<directory>${project.build.outputDirectory}/META-INF/fabric8</directory>
                                     <includes>
                                         
<include>flinkdeployments.flink.apache.org-v1.yml</include>
-                                        
<include>flinksessionjobs.flink.apache.org-v1.yml</include>
                                     </includes>
                                     <filtering>false</filtering>
                                 </resource>
diff --git 
a/flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/crd/spec/FlinkSessionJobSpec.java
 
b/flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/crd/FlinkDeploymentList.java
similarity index 61%
rename from 
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/crd/spec/FlinkSessionJobSpec.java
rename to 
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/crd/FlinkDeploymentList.java
index fc25ade..c9abd0c 100644
--- 
a/flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/crd/spec/FlinkSessionJobSpec.java
+++ 
b/flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/crd/FlinkDeploymentList.java
@@ -15,29 +15,12 @@
  * limitations under the License.
  */
 
-package org.apache.flink.kubernetes.operator.crd.spec;
+package org.apache.flink.kubernetes.operator.crd;
 
 import org.apache.flink.annotation.Experimental;
 
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
+import io.fabric8.kubernetes.client.CustomResourceList;
 
-/** Spec that describes a Flink session job. */
+/** Multiple Flink deployments. */
 @Experimental
-@Data
-@NoArgsConstructor
-@AllArgsConstructor
-@Builder
-public class FlinkSessionJobSpec {
-
-    /**
-     * The cluster id of the target session cluster. When deployed using the 
operator the cluster id
-     * is the name of the deployment.
-     */
-    private String clusterId;
-
-    /** A specification of a job . */
-    private JobSpec job;
-}
+public class FlinkDeploymentList extends CustomResourceList<FlinkDeployment> {}
diff --git 
a/flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/crd/FlinkSessionJob.java
 
b/flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/crd/FlinkSessionJob.java
deleted file mode 100644
index 2378b76..0000000
--- 
a/flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/crd/FlinkSessionJob.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.flink.kubernetes.operator.crd;
-
-import org.apache.flink.annotation.Experimental;
-import org.apache.flink.kubernetes.operator.crd.spec.FlinkSessionJobSpec;
-import org.apache.flink.kubernetes.operator.crd.status.FlinkSessionJobStatus;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-import io.fabric8.kubernetes.api.model.Namespaced;
-import io.fabric8.kubernetes.client.CustomResource;
-import io.fabric8.kubernetes.model.annotation.Group;
-import io.fabric8.kubernetes.model.annotation.ShortNames;
-import io.fabric8.kubernetes.model.annotation.Version;
-
-/** Custom resource definition that represents a flink session job. */
-@Experimental
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonDeserialize()
-@Group("flink.apache.org")
-@Version("v1alpha1")
-@ShortNames({"sessionjob"})
-public class FlinkSessionJob extends CustomResource<FlinkSessionJobSpec, 
FlinkSessionJobStatus>
-        implements Namespaced {
-
-    @Override
-    protected FlinkSessionJobStatus initStatus() {
-        return new FlinkSessionJobStatus();
-    }
-}
diff --git 
a/flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/crd/status/FlinkSessionJobReconciliationStatus.java
 
b/flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/crd/status/FlinkSessionJobReconciliationStatus.java
deleted file mode 100644
index b0b18c0..0000000
--- 
a/flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/crd/status/FlinkSessionJobReconciliationStatus.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.flink.kubernetes.operator.crd.status;
-
-import org.apache.flink.annotation.Experimental;
-import org.apache.flink.kubernetes.operator.crd.spec.FlinkSessionJobSpec;
-
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-/** Status of the last reconcile step for the session job. */
-@Experimental
-@Data
-@NoArgsConstructor
-@AllArgsConstructor
-@Builder
-public class FlinkSessionJobReconciliationStatus {
-    /** True if last reconciliation step was successful. */
-    private boolean success;
-
-    /** If success == false, error information about the reconciliation 
failure. */
-    private String error;
-
-    /**
-     * Last reconciled job spec. Used to decide whether further reconciliation 
steps are necessary.
-     */
-    private FlinkSessionJobSpec flinkSessionJobSpec;
-}
diff --git 
a/flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/crd/status/FlinkSessionJobStatus.java
 
b/flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/crd/status/FlinkSessionJobStatus.java
deleted file mode 100644
index 7c3189d..0000000
--- 
a/flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/crd/status/FlinkSessionJobStatus.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.flink.kubernetes.operator.crd.status;
-
-import org.apache.flink.annotation.Experimental;
-
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-/** Last observed status of the Flink Session job. */
-@Experimental
-@Data
-@NoArgsConstructor
-@AllArgsConstructor
-public class FlinkSessionJobStatus {
-
-    /** Last observed status of the job. */
-    private JobStatus jobStatus = new JobStatus();
-
-    /** Status of the last reconcile operation. */
-    private FlinkSessionJobReconciliationStatus reconciliationStatus =
-            new FlinkSessionJobReconciliationStatus();
-}
diff --git a/helm/flink-operator/crds/flinksessionjobs.flink.apache.org-v1.yml 
b/helm/flink-operator/crds/flinksessionjobs.flink.apache.org-v1.yml
deleted file mode 100644
index 6ea6bee..0000000
--- a/helm/flink-operator/crds/flinksessionjobs.flink.apache.org-v1.yml
+++ /dev/null
@@ -1,127 +0,0 @@
-# Generated by Fabric8 CRDGenerator, manual edits might get overwritten!
-apiVersion: apiextensions.k8s.io/v1
-kind: CustomResourceDefinition
-metadata:
-  name: flinksessionjobs.flink.apache.org
-spec:
-  group: flink.apache.org
-  names:
-    kind: FlinkSessionJob
-    plural: flinksessionjobs
-    shortNames:
-    - sessionjob
-    singular: flinksessionjob
-  scope: Namespaced
-  versions:
-  - name: v1alpha1
-    schema:
-      openAPIV3Schema:
-        properties:
-          spec:
-            properties:
-              clusterId:
-                type: string
-              job:
-                properties:
-                  jarURI:
-                    type: string
-                  parallelism:
-                    type: integer
-                  entryClass:
-                    type: string
-                  args:
-                    items:
-                      type: string
-                    type: array
-                  state:
-                    enum:
-                    - running
-                    - suspended
-                    type: string
-                  savepointTriggerNonce:
-                    type: integer
-                  initialSavepointPath:
-                    type: string
-                  upgradeMode:
-                    enum:
-                    - savepoint
-                    - last-state
-                    - stateless
-                    type: string
-                type: object
-            type: object
-          status:
-            properties:
-              jobStatus:
-                properties:
-                  jobName:
-                    type: string
-                  jobId:
-                    type: string
-                  state:
-                    type: string
-                  startTime:
-                    type: string
-                  updateTime:
-                    type: string
-                  savepointInfo:
-                    properties:
-                      lastSavepoint:
-                        properties:
-                          timeStamp:
-                            type: integer
-                          location:
-                            type: string
-                        type: object
-                      triggerId:
-                        type: string
-                      triggerTimestamp:
-                        type: integer
-                    type: object
-                type: object
-              reconciliationStatus:
-                properties:
-                  success:
-                    type: boolean
-                  error:
-                    type: string
-                  flinkSessionJobSpec:
-                    properties:
-                      clusterId:
-                        type: string
-                      job:
-                        properties:
-                          jarURI:
-                            type: string
-                          parallelism:
-                            type: integer
-                          entryClass:
-                            type: string
-                          args:
-                            items:
-                              type: string
-                            type: array
-                          state:
-                            enum:
-                            - running
-                            - suspended
-                            type: string
-                          savepointTriggerNonce:
-                            type: integer
-                          initialSavepointPath:
-                            type: string
-                          upgradeMode:
-                            enum:
-                            - savepoint
-                            - last-state
-                            - stateless
-                            type: string
-                        type: object
-                    type: object
-                type: object
-            type: object
-        type: object
-    served: true
-    storage: true
-    subresources:
-      status: {}
diff --git a/pom.xml b/pom.xml
index ee1d3b0..8e2adce 100644
--- a/pom.xml
+++ b/pom.xml
@@ -273,7 +273,6 @@ under the License.
                             <exclude>**/.idea/**</exclude>
                             <!-- Generated CRD -->
                             
<exclude>helm/flink-operator/crds/flinkdeployments.flink.apache.org-v1.yml</exclude>
-                            
<exclude>helm/flink-operator/crds/flinksessionjobs.flink.apache.org-v1.yml</exclude>
                             <exclude>rio.yml</exclude>
                         </excludes>
                     </configuration>

Reply via email to