mirror of
https://github.com/argoproj/argo-cd.git
synced 2026-02-20 01:28:45 +01:00
* Adding Synergy as a ArgoCD user Signed-off-by: GitHub <noreply@github.com> * Health checking Kafka Connector resources Signed-off-by: Clint Chester <clint.chester@synergy.net.au> * Includes Kafka Connect Task Failures Signed-off-by: Clint Chester <clint.chester@synergy.net.au> --------- Signed-off-by: GitHub <noreply@github.com> Signed-off-by: Clint Chester <clint.chester@synergy.net.au>
This commit is contained in:
1
USERS.md
1
USERS.md
@@ -335,6 +335,7 @@ Currently, the following organizations are **officially** using Argo CD:
|
||||
1. [Swisscom](https://www.swisscom.ch)
|
||||
1. [Swissquote](https://github.com/swissquote)
|
||||
1. [Syncier](https://syncier.com/)
|
||||
1. [Synergy](https://synergy.net.au)
|
||||
1. [Syself](https://syself.com)
|
||||
1. [TableCheck](https://tablecheck.com/)
|
||||
1. [Tailor Brands](https://www.tailorbrands.com)
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
hs = {}
|
||||
if obj.status ~= nil and obj.status.state ~= nil then
|
||||
if obj.status.state == "CREATED" and obj.status.connectorState == "RUNNING" and obj.status.failedTasksCount == nil then
|
||||
hs.status = "Healthy"
|
||||
hs.message = "Connector running"
|
||||
return hs
|
||||
end
|
||||
if obj.status.state == "ERROR" then
|
||||
hs.status = "Degraded"
|
||||
if obj.status.conditions and #obj.status.conditions > 0 then
|
||||
hs.message = obj.status.conditions[1].message -- Kafka Connector only has one condition and nests the issues in the error message here
|
||||
else
|
||||
hs.message = "No conditions available"
|
||||
end
|
||||
return hs
|
||||
end
|
||||
if obj.status.failedTasksCount ~= nil and obj.status.failedTasksCount > 0 then
|
||||
hs.status = "Degraded"
|
||||
hs.message = "Connector has failed tasks"
|
||||
return hs
|
||||
end
|
||||
end
|
||||
hs.status = "Progressing"
|
||||
hs.message = "Waiting for Kafka Connector"
|
||||
return hs
|
||||
@@ -0,0 +1,13 @@
|
||||
tests:
|
||||
- healthStatus:
|
||||
status: Healthy
|
||||
message: 'Connector running'
|
||||
inputPath: testdata/connector-healthy.yaml
|
||||
- healthStatus:
|
||||
status: Degraded
|
||||
message: 'connect Rest API request failed: Connector configuration is invalid and contains the following 1 error(s): Could not read properties from file'
|
||||
inputPath: testdata/connector-failure.yaml
|
||||
- healthStatus:
|
||||
status: Degraded
|
||||
message: 'Connector has failed tasks'
|
||||
inputPath: testdata/connector-task-failure.yaml
|
||||
27
resource_customizations/platform.confluent.io/Connector/testdata/connector-failure.yaml
vendored
Normal file
27
resource_customizations/platform.confluent.io/Connector/testdata/connector-failure.yaml
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
apiVersion: platform.confluent.io/v1beta1
|
||||
kind: Connector
|
||||
metadata:
|
||||
finalizers:
|
||||
- connect.finalizers.platform.confluent.io
|
||||
generation: 1
|
||||
name: connect
|
||||
namespace: confluent
|
||||
spec:
|
||||
class: io.confluent.connect.sftp.SftpSinkConnector
|
||||
configs:
|
||||
topics: test-topic
|
||||
connectClusterRef:
|
||||
name: connect
|
||||
name: test-sftp-connector
|
||||
taskMax: 3
|
||||
status:
|
||||
appState: Failed
|
||||
conditions:
|
||||
- lastProbeTime: '2024-04-02T07:43:35Z'
|
||||
lastTransitionTime: '2024-04-02T07:43:35Z'
|
||||
message: >-
|
||||
connect Rest API request failed: Connector configuration is invalid and contains the following 1 error(s): Could not read properties from file
|
||||
reason: CreateFailed
|
||||
status: 'False'
|
||||
type: platform.confluent.io/app-ready
|
||||
state: ERROR
|
||||
31
resource_customizations/platform.confluent.io/Connector/testdata/connector-healthy.yaml
vendored
Normal file
31
resource_customizations/platform.confluent.io/Connector/testdata/connector-healthy.yaml
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
apiVersion: platform.confluent.io/v1beta1
|
||||
kind: Connector
|
||||
metadata:
|
||||
finalizers:
|
||||
- connect.finalizers.platform.confluent.io
|
||||
generation: 1
|
||||
name: connect
|
||||
namespace: confluent
|
||||
spec:
|
||||
class: io.confluent.connect.sftp.SftpSinkConnector
|
||||
configs:
|
||||
topics: test-topic
|
||||
connectClusterRef:
|
||||
name: connect
|
||||
name: test-sftp-connector
|
||||
taskMax: 3
|
||||
status:
|
||||
appState: Created
|
||||
conditions:
|
||||
- lastProbeTime: '2024-04-02T07:43:35Z'
|
||||
lastTransitionTime: '2024-04-02T07:43:35Z'
|
||||
message: Application is created
|
||||
reason: Created
|
||||
status: 'True'
|
||||
type: platform.confluent.io/app-ready
|
||||
connectorState: RUNNING
|
||||
restartPolicy:
|
||||
maxRetry: 10
|
||||
type: OnFailure
|
||||
state: CREATED
|
||||
tasksReady: 3/3
|
||||
37
resource_customizations/platform.confluent.io/Connector/testdata/connector-task-failure.yaml
vendored
Normal file
37
resource_customizations/platform.confluent.io/Connector/testdata/connector-task-failure.yaml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
apiVersion: platform.confluent.io/v1beta1
|
||||
kind: Connector
|
||||
metadata:
|
||||
finalizers:
|
||||
- connect.finalizers.platform.confluent.io
|
||||
generation: 1
|
||||
name: connect
|
||||
namespace: confluent
|
||||
spec:
|
||||
class: io.confluent.connect.sftp.SftpSinkConnector
|
||||
configs:
|
||||
topics: test-topic
|
||||
connectClusterRef:
|
||||
name: connect
|
||||
name: test-sftp-connector
|
||||
taskMax: 3
|
||||
status:
|
||||
appState: Unknown
|
||||
conditions:
|
||||
- lastProbeTime: '2024-01-19T06:42:40Z'
|
||||
lastTransitionTime: '2024-01-19T06:42:40Z'
|
||||
message: Application is created
|
||||
reason: Created
|
||||
status: 'True'
|
||||
type: platform.confluent.io/app-ready
|
||||
connectorState: RUNNING
|
||||
failedTasks:
|
||||
task-0:
|
||||
id: 0
|
||||
retryCount: 10
|
||||
failedTasksCount: 1
|
||||
observedGeneration: 1
|
||||
restartPolicy:
|
||||
maxRetry: 10
|
||||
type: OnFailure
|
||||
state: CREATED
|
||||
tasksReady: 0/1
|
||||
Reference in New Issue
Block a user