Skip to content

Commit c064a16

Browse files
authored
Report subscription status (#38)
* Report subscription status * Doc string improvement h/t @hshukla * Wordsmithing h/t @ehoner
1 parent d5c4edd commit c064a16

16 files changed

+263
-76
lines changed

deploy/dev/rbac.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
apiVersion: rbac.authorization.k8s.io/v1
22
kind: RoleBinding
33
metadata:
4-
name: hoptimator-controller
4+
name: hoptimator-operator
55
namespace: default
66
subjects:
77
- kind: ServiceAccount
8-
name: default
8+
name: hoptimator-operator
99
namespace: default
1010
roleRef:
1111
kind: Role
12-
name: hoptimator-controller
12+
name: hoptimator-operator
1313
apiGroup: rbac.authorization.k8s.io

deploy/hoptimator-operator-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ spec:
1414
labels:
1515
app: hoptimator-operator
1616
spec:
17+
serviceAccountName: hoptimator-operator
1718
containers:
1819
- name: hoptimator-operator
1920
image: docker.io/library/hoptimator

deploy/rbac.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@ apiVersion: rbac.authorization.k8s.io/v1
22
kind: Role
33
metadata:
44
namespace: default
5-
name: hoptimator-controller
5+
name: hoptimator-operator
66
rules:
77
- apiGroups: ["hoptimator.linkedin.com"]
88
resources: ["kafkatopics", "subscriptions"]
9-
verbs: ["get", "watch", "list", "update", "create"]
9+
verbs: ["get", "watch", "list", "create"]
10+
- apiGroups: ["hoptimator.linkedin.com"]
11+
resources: ["kafkatopics/status", "subscriptions/status"]
12+
verbs: ["get", "patch"]
1013
- apiGroups: ["flink.apache.org"]
1114
resources: ["flinkdeployments"]
12-
verbs: ["update", "create"]
15+
verbs: ["get", "update", "create"]
1316

deploy/subscriptions.crd.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,21 @@ spec:
5151
message:
5252
description: Error or success message, for information only.
5353
type: string
54+
sql:
55+
description: The SQL being implemented by this pipeline.
56+
type: string
57+
resources:
58+
description: The YAML generated to implement this pipeline.
59+
type: array
60+
items:
61+
type: string
5462
subresources:
5563
status: {}
5664
additionalPrinterColumns:
65+
- name: STATUS
66+
type: string
67+
description: Status message from the operator.
68+
jsonPath: .status.message
5769
- name: DB
5870
type: string
5971
description: The database where the subscription is materialized.

hoptimator-models/src/main/java/com/linkedin/hoptimator/models/V1alpha1KafkaTopic.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* Kafka Topic
3232
*/
3333
@ApiModel(description = "Kafka Topic")
34-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-04-28T19:46:31.976Z[Etc/UTC]")
34+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-29T22:51:02.615Z[Etc/UTC]")
3535
public class V1alpha1KafkaTopic implements io.kubernetes.client.common.KubernetesObject {
3636
public static final String SERIALIZED_NAME_API_VERSION = "apiVersion";
3737
@SerializedName(SERIALIZED_NAME_API_VERSION)

hoptimator-models/src/main/java/com/linkedin/hoptimator/models/V1alpha1KafkaTopicList.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* KafkaTopicList is a list of KafkaTopic
3333
*/
3434
@ApiModel(description = "KafkaTopicList is a list of KafkaTopic")
35-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-04-28T19:46:31.976Z[Etc/UTC]")
35+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-29T22:51:02.615Z[Etc/UTC]")
3636
public class V1alpha1KafkaTopicList implements io.kubernetes.client.common.KubernetesListObject {
3737
public static final String SERIALIZED_NAME_API_VERSION = "apiVersion";
3838
@SerializedName(SERIALIZED_NAME_API_VERSION)

hoptimator-models/src/main/java/com/linkedin/hoptimator/models/V1alpha1KafkaTopicSpec.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* Desired Kafka topic configuration.
3434
*/
3535
@ApiModel(description = "Desired Kafka topic configuration.")
36-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-04-28T19:46:31.976Z[Etc/UTC]")
36+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-29T22:51:02.615Z[Etc/UTC]")
3737
public class V1alpha1KafkaTopicSpec {
3838
public static final String SERIALIZED_NAME_CLIENT_CONFIGS = "clientConfigs";
3939
@SerializedName(SERIALIZED_NAME_CLIENT_CONFIGS)

hoptimator-models/src/main/java/com/linkedin/hoptimator/models/V1alpha1KafkaTopicSpecClientConfigs.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
/**
2929
* V1alpha1KafkaTopicSpecClientConfigs
3030
*/
31-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-04-28T19:46:31.976Z[Etc/UTC]")
31+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-29T22:51:02.615Z[Etc/UTC]")
3232
public class V1alpha1KafkaTopicSpecClientConfigs {
3333
public static final String SERIALIZED_NAME_CONFIG_MAP_REF = "configMapRef";
3434
@SerializedName(SERIALIZED_NAME_CONFIG_MAP_REF)

hoptimator-models/src/main/java/com/linkedin/hoptimator/models/V1alpha1KafkaTopicSpecConfigMapRef.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* Reference to a ConfigMap to use for AdminClient configuration.
2929
*/
3030
@ApiModel(description = "Reference to a ConfigMap to use for AdminClient configuration.")
31-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-04-28T19:46:31.976Z[Etc/UTC]")
31+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-29T22:51:02.615Z[Etc/UTC]")
3232
public class V1alpha1KafkaTopicSpecConfigMapRef {
3333
public static final String SERIALIZED_NAME_NAME = "name";
3434
@SerializedName(SERIALIZED_NAME_NAME)

hoptimator-models/src/main/java/com/linkedin/hoptimator/models/V1alpha1KafkaTopicStatus.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* Current state of the topic.
2929
*/
3030
@ApiModel(description = "Current state of the topic.")
31-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-04-28T19:46:31.976Z[Etc/UTC]")
31+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-29T22:51:02.615Z[Etc/UTC]")
3232
public class V1alpha1KafkaTopicStatus {
3333
public static final String SERIALIZED_NAME_MESSAGE = "message";
3434
@SerializedName(SERIALIZED_NAME_MESSAGE)

0 commit comments

Comments
 (0)