Skip to content

Commit

Permalink
feat(controllers): update status condition message
Browse files Browse the repository at this point in the history
Previous message contained a typo.
  • Loading branch information
rriski committed Jun 19, 2024
1 parent cae5717 commit 55cc5fd
Show file tree
Hide file tree
Showing 20 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion controllers/clickhousedatabase_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (h *ClickhouseDatabaseHandler) createOrUpdate(ctx context.Context, avn *aiv

meta.SetStatusCondition(&db.Status.Conditions,
getInitializedCondition("Created",
"Instance was created or update on Aiven side"))
"Successfully created or updated the instance in Aiven"))

metav1.SetMetaDataAnnotation(&db.ObjectMeta,
processedGenerationAnnotation, strconv.FormatInt(db.GetGeneration(), formatIntBaseDecimal))
Expand Down
2 changes: 1 addition & 1 deletion controllers/clickhouserole_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (h *clickhouseRoleHandler) createOrUpdate(ctx context.Context, avn *aiven.C

meta.SetStatusCondition(&role.Status.Conditions,
getInitializedCondition("Created",
"Instance was created or update on Aiven side"))
"Successfully created or updated the instance in Aiven"))

metav1.SetMetaDataAnnotation(&role.ObjectMeta,
processedGenerationAnnotation, strconv.FormatInt(role.GetGeneration(), formatIntBaseDecimal))
Expand Down
2 changes: 1 addition & 1 deletion controllers/clickhouseuser_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (h *clickhouseUserHandler) createOrUpdate(ctx context.Context, avn *aiven.C

meta.SetStatusCondition(&user.Status.Conditions,
getInitializedCondition("Created",
"Instance was created or update on Aiven side"))
"Successfully created or updated the instance in Aiven"))

metav1.SetMetaDataAnnotation(&user.ObjectMeta,
processedGenerationAnnotation, strconv.FormatInt(user.GetGeneration(), formatIntBaseDecimal))
Expand Down
2 changes: 1 addition & 1 deletion controllers/connectionpool_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func (h ConnectionPoolHandler) createOrUpdate(ctx context.Context, avn *aiven.Cl

meta.SetStatusCondition(&cp.Status.Conditions,
getInitializedCondition(reason,
"Instance was created or update on Aiven side"))
"Successfully created or updated the instance in Aiven"))

metav1.SetMetaDataAnnotation(&cp.ObjectMeta,
processedGenerationAnnotation, strconv.FormatInt(cp.GetGeneration(), formatIntBaseDecimal))
Expand Down
2 changes: 1 addition & 1 deletion controllers/database_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (h DatabaseHandler) createOrUpdate(ctx context.Context, avn *aiven.Client,

meta.SetStatusCondition(&db.Status.Conditions,
getInitializedCondition("Created",
"Instance was created or update on Aiven side"))
"Successfully created or updated the instance in Aiven"))

metav1.SetMetaDataAnnotation(&db.ObjectMeta,
processedGenerationAnnotation, strconv.FormatInt(db.GetGeneration(), formatIntBaseDecimal))
Expand Down
4 changes: 2 additions & 2 deletions controllers/generic_service_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ func (h *genericServiceHandler) createOrUpdate(ctx context.Context, avn *aiven.C

status := o.getServiceStatus()
meta.SetStatusCondition(&status.Conditions,
getInitializedCondition(reason, "Instance was created or update on Aiven side"))
getInitializedCondition(reason, "Successfully created or updated the instance in Aiven"))
meta.SetStatusCondition(&status.Conditions,
getRunningCondition(metav1.ConditionUnknown, reason, "Instance was created or update on Aiven side, status remains unknown"))
getRunningCondition(metav1.ConditionUnknown, reason, "Successfully created or updated the instance in Aiven, status remains unknown"))

metav1.SetMetaDataAnnotation(
o.getObjectMeta(),
Expand Down
2 changes: 1 addition & 1 deletion controllers/kafkaacl_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (h KafkaACLHandler) createOrUpdate(ctx context.Context, avn *aiven.Client,
acl.Status.ID = r.ID
meta.SetStatusCondition(&acl.Status.Conditions,
getInitializedCondition("CreatedOrUpdate",
"Instance was created or update on Aiven side"))
"Successfully created or updated the instance in Aiven"))

metav1.SetMetaDataAnnotation(&acl.ObjectMeta,
processedGenerationAnnotation, strconv.FormatInt(acl.GetGeneration(), formatIntBaseDecimal))
Expand Down
4 changes: 2 additions & 2 deletions controllers/kafkaconnector_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ func (h KafkaConnectorHandler) createOrUpdate(ctx context.Context, avn *aiven.Cl

meta.SetStatusCondition(&conn.Status.Conditions,
getInitializedCondition(reason,
"Instance was created or update on Aiven side"))
"Successfully created or updated the instance in Aiven"))

meta.SetStatusCondition(&conn.Status.Conditions,
getRunningCondition(metav1.ConditionUnknown, reason,
"Instance was created or update on Aiven side, status remains unknown"))
"Successfully created or updated the instance in Aiven, status remains unknown"))

metav1.SetMetaDataAnnotation(&conn.ObjectMeta,
processedGenerationAnnotation, strconv.FormatInt(conn.GetGeneration(), formatIntBaseDecimal))
Expand Down
2 changes: 1 addition & 1 deletion controllers/kafkaschema_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (h KafkaSchemaHandler) createOrUpdate(ctx context.Context, avn *aiven.Clien

meta.SetStatusCondition(&schema.Status.Conditions,
getInitializedCondition("Added",
"Instance was created or update on Aiven side"))
"Successfully created or updated the instance in Aiven"))

metav1.SetMetaDataAnnotation(&schema.ObjectMeta,
processedGenerationAnnotation, strconv.FormatInt(schema.GetGeneration(), formatIntBaseDecimal))
Expand Down
2 changes: 1 addition & 1 deletion controllers/kafkaschemaregistryacl_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func (h KafkaSchemaRegistryACLHandler) createOrUpdate(ctx context.Context, avn *

meta.SetStatusCondition(&acl.Status.Conditions,
getInitializedCondition("Created",
"Instance was created or update on Aiven side"))
"Successfully created or updated the instance in Aiven"))

metav1.SetMetaDataAnnotation(&acl.ObjectMeta,
processedGenerationAnnotation, strconv.FormatInt(acl.GetGeneration(), formatIntBaseDecimal))
Expand Down
2 changes: 1 addition & 1 deletion controllers/kafkatopic_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func (h KafkaTopicHandler) createOrUpdate(ctx context.Context, avn *aiven.Client

meta.SetStatusCondition(&topic.Status.Conditions,
getInitializedCondition(reason,
"Instance was created or update on Aiven side"))
"Successfully created or updated the instance in Aiven"))

metav1.SetMetaDataAnnotation(&topic.ObjectMeta,
processedGenerationAnnotation, strconv.FormatInt(topic.GetGeneration(), formatIntBaseDecimal))
Expand Down
2 changes: 1 addition & 1 deletion controllers/project_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func (h ProjectHandler) createOrUpdate(ctx context.Context, avn *aiven.Client, a

meta.SetStatusCondition(&project.Status.Conditions,
getInitializedCondition(reason,
"Instance was created or update on Aiven side"))
"Successfully created or updated the instance in Aiven"))

metav1.SetMetaDataAnnotation(&project.ObjectMeta,
processedGenerationAnnotation, strconv.FormatInt(project.GetGeneration(), formatIntBaseDecimal))
Expand Down
4 changes: 2 additions & 2 deletions controllers/projectvpc_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ func (h *ProjectVPCHandler) createOrUpdate(ctx context.Context, avn *aiven.Clien

meta.SetStatusCondition(&projectVPC.Status.Conditions,
getInitializedCondition("Created",
"Instance was created or update on Aiven side"))
"Successfully created or updated the instance in Aiven"))

meta.SetStatusCondition(&projectVPC.Status.Conditions,
getRunningCondition(metav1.ConditionUnknown, "Created",
"Instance was created or update on Aiven side, status remains unknown"))
"Successfully created or updated the instance in Aiven, status remains unknown"))

metav1.SetMetaDataAnnotation(&projectVPC.ObjectMeta,
processedGenerationAnnotation, strconv.FormatInt(projectVPC.GetGeneration(), formatIntBaseDecimal))
Expand Down
2 changes: 1 addition & 1 deletion controllers/serviceintegration_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (h ServiceIntegrationHandler) createOrUpdate(ctx context.Context, avn *aive

meta.SetStatusCondition(&si.Status.Conditions,
getInitializedCondition(reason,
"Instance was created or update on Aiven side"))
"Successfully created or updated the instance in Aiven"))

metav1.SetMetaDataAnnotation(&si.ObjectMeta,
processedGenerationAnnotation, strconv.FormatInt(si.GetGeneration(), formatIntBaseDecimal))
Expand Down
2 changes: 1 addition & 1 deletion controllers/serviceintegrationendpoint_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func (h ServiceIntegrationEndpointHandler) createOrUpdate(ctx context.Context, a

meta.SetStatusCondition(&si.Status.Conditions,
getInitializedCondition(reason,
"Instance was created or update on Aiven side"))
"Successfully created or updated the instance in Aiven"))

metav1.SetMetaDataAnnotation(&si.ObjectMeta,
processedGenerationAnnotation, strconv.FormatInt(si.GetGeneration(), formatIntBaseDecimal))
Expand Down
2 changes: 1 addition & 1 deletion controllers/serviceuser_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (h ServiceUserHandler) createOrUpdate(ctx context.Context, avn *aiven.Clien

meta.SetStatusCondition(&user.Status.Conditions,
getInitializedCondition("Created",
"Instance was created or update on Aiven side"))
"Successfully created or updated the instance in Aiven"))

metav1.SetMetaDataAnnotation(&user.ObjectMeta,
processedGenerationAnnotation, strconv.FormatInt(user.GetGeneration(), formatIntBaseDecimal))
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/resources/cassandra.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ The output is similar to the following:
Status:
Conditions:
Last Transition Time: 2023-01-31T10:17:25Z
Message: Instance was created or update on Aiven side
Message: Successfully created or updated the instance in Aiven
Reason: Created
Status: True
Type: Initialized
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/resources/mysql.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ The output is similar to the following:
Status:
Conditions:
Last Transition Time: 2023-02-22T15:43:44Z
Message: Instance was created or update on Aiven side
Message: Successfully created or updated the instance in Aiven
Reason: Created
Status: True
Type: Initialized
Last Transition Time: 2023-02-22T15:43:44Z
Message: Instance was created or update on Aiven side, status remains unknown
Message: Successfully created or updated the instance in Aiven, status remains unknown
Reason: Created
Status: Unknown
Type: Running
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/resources/opensearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ The output is similar to the following:
Status:
Conditions:
Last Transition Time: 2023-01-19T14:41:43Z
Message: Instance was created or update on Aiven side
Message: Successfully created or updated the instance in Aiven
Reason: Created
Status: True
Type: Initialized
Last Transition Time: 2023-01-19T14:41:43Z
Message: Instance was created or update on Aiven side, status remains unknown
Message: Successfully created or updated the instance in Aiven, status remains unknown
Reason: Created
Status: Unknown
Type: Running
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/resources/redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ weight: 50
Aiven for Redis®\* is a fully managed in-memory NoSQL database that you can deploy in the cloud of your choice to store and access data quickly and efficiently.

!!! note
Before going through this guide, make sure you have a [Kubernetes cluster](../installation/prerequisites.md) with the operator installed (see instructions for [helm](../installation/helm.md) or [kubectl](../installation/kubectl.md)),
Before going through this guide, make sure you have a [Kubernetes cluster](../installation/prerequisites.md) with the operator installed (see instructions for [helm](../installation/helm.md) or [kubectl](../installation/kubectl.md)),
and a [Kubernetes Secret with an Aiven authentication token](../authentication.md).

## Creating a Redis instance
Expand Down Expand Up @@ -65,12 +65,12 @@ The output is similar to the following:
Status:
Conditions:
Last Transition Time: 2023-01-19T14:48:59Z
Message: Instance was created or update on Aiven side
Message: Successfully created or updated the instance in Aiven
Reason: Created
Status: True
Type: Initialized
Last Transition Time: 2023-01-19T14:48:59Z
Message: Instance was created or update on Aiven side, status remains unknown
Message: Successfully created or updated the instance in Aiven, status remains unknown
Reason: Created
Status: Unknown
Type: Running
Expand Down

0 comments on commit 55cc5fd

Please sign in to comment.