diff --git a/bundle/manifests/gitops-operator.clusterserviceversion.yaml b/bundle/manifests/gitops-operator.clusterserviceversion.yaml index c1afbd774..42045ae64 100644 --- a/bundle/manifests/gitops-operator.clusterserviceversion.yaml +++ b/bundle/manifests/gitops-operator.clusterserviceversion.yaml @@ -30,6 +30,35 @@ metadata: }, { "apiVersion": "argoproj.io/v1alpha1", + "kind": "NotificationsConfiguration", + "metadata": { + "name": "default-notifications-configuration" + }, + "spec": { + "templates": { + "template.app-created": "email:\n subject: Application {{.app.metadata.name}} has been created.\nmessage: Application {{.app.metadata.name}} has been created.\nteams:\n title: Application {{.app.metadata.name}} has been created.", + "template.app-deleted": "email:\n subject: Application {{.app.metadata.name}} has been deleted.\nmessage: Application {{.app.metadata.name}} has been deleted.\nteams:\n title: Application {{.app.metadata.name}} has been deleted.", + "template.app-deployed": "email:\n subject: New version of an application {{.app.metadata.name}} is up and running.\nmessage: |\n {{if eq .serviceType \"slack\"}}:white_check_mark:{{end}} Application {{.app.metadata.name}} is now running new version of deployments manifests.\nslack:\n attachments: |\n [{\n \"title\": \"{{ .app.metadata.name}}\",\n \"title_link\":\"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}\",\n \"color\": \"#18be52\",\n \"fields\": [\n {\n \"title\": \"Sync Status\",\n \"value\": \"{{.app.status.sync.status}}\",\n \"short\": true\n },\n {\n \"title\": \"Repository\",\n \"value\": \"{{.app.spec.source.repoURL}}\",\n \"short\": true\n },\n {\n \"title\": \"Revision\",\n \"value\": \"{{.app.status.sync.revision}}\",\n \"short\": true\n }\n {{range $index, $c := .app.status.conditions}}\n {{if not $index}},{{end}}\n {{if $index}},{{end}}\n {\n \"title\": \"{{$c.type}}\",\n \"value\": \"{{$c.message}}\",\n \"short\": true\n }\n {{end}}\n ]\n }]\n deliveryPolicy: Post\n groupingKey: \"\"\n notifyBroadcast: false\nteams:\n facts: |\n [{\n \"name\": \"Sync Status\",\n \"value\": \"{{.app.status.sync.status}}\"\n },\n {\n \"name\": \"Repository\",\n \"value\": \"{{.app.spec.source.repoURL}}\"\n },\n {\n \"name\": \"Revision\",\n \"value\": \"{{.app.status.sync.revision}}\"\n }\n {{range $index, $c := .app.status.conditions}}\n {{if not $index}},{{end}}\n {{if $index}},{{end}}\n {\n \"name\": \"{{$c.type}}\",\n \"value\": \"{{$c.message}}\"\n }\n {{end}}\n ]\n potentialAction: |-\n [{\n \"@type\":\"OpenUri\",\n \"name\":\"Operation Application\",\n \"targets\":[{\n \"os\":\"default\",\n \"uri\":\"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}\"\n }]\n },\n {\n \"@type\":\"OpenUri\",\n \"name\":\"Open Repository\",\n \"targets\":[{\n \"os\":\"default\",\n \"uri\":\"{{.app.spec.source.repoURL | call .repo.RepoURLToHTTPS}}\"\n }]\n }]\n themeColor: '#000080'\n title: New version of an application {{.app.metadata.name}} is up and running.", + "template.app-health-degraded": "email:\n subject: Application {{.app.metadata.name}} has degraded.\nmessage: |\n {{if eq .serviceType \"slack\"}}:exclamation:{{end}} Application {{.app.metadata.name}} has degraded.\n Application details: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}.\nslack:\n attachments: |\n [{\n \"title\": \"{{ .app.metadata.name}}\",\n \"title_link\": \"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}\",\n \"color\": \"#f4c030\",\n \"fields\": [\n {\n \"title\": \"Health Status\",\n \"value\": \"{{.app.status.health.status}}\",\n \"short\": true\n },\n {\n \"title\": \"Repository\",\n \"value\": \"{{.app.spec.source.repoURL}}\",\n \"short\": true\n }\n {{range $index, $c := .app.status.conditions}}\n {{if not $index}},{{end}}\n {{if $index}},{{end}}\n {\n \"title\": \"{{$c.type}}\",\n \"value\": \"{{$c.message}}\",\n \"short\": true\n }\n {{end}}\n ]\n }]\n deliveryPolicy: Post\n groupingKey: \"\"\n notifyBroadcast: false\nteams:\n facts: |\n [{\n \"name\": \"Health Status\",\n \"value\": \"{{.app.status.health.status}}\"\n },\n {\n \"name\": \"Repository\",\n \"value\": \"{{.app.spec.source.repoURL}}\"\n }\n {{range $index, $c := .app.status.conditions}}\n {{if not $index}},{{end}}\n {{if $index}},{{end}}\n {\n \"name\": \"{{$c.type}}\",\n \"value\": \"{{$c.message}}\"\n }\n {{end}}\n ]\n potentialAction: |\n [{\n \"@type\":\"OpenUri\",\n \"name\":\"Open Application\",\n \"targets\":[{\n \"os\":\"default\",\n \"uri\":\"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}\"\n }]\n },\n {\n \"@type\":\"OpenUri\",\n \"name\":\"Open Repository\",\n \"targets\":[{\n \"os\":\"default\",\n \"uri\":\"{{.app.spec.source.repoURL | call .repo.RepoURLToHTTPS}}\"\n }]\n }]\n themeColor: '#FF0000'\n title: Application {{.app.metadata.name}} has degraded.", + "template.app-sync-failed": "email:\n subject: Failed to sync application {{.app.metadata.name}}.\nmessage: |\n {{if eq .serviceType \"slack\"}}:exclamation:{{end}} The sync operation of application {{.app.metadata.name}} has failed at {{.app.status.operationState.finishedAt}} with the following error: {{.app.status.operationState.message}}\n Sync operation details are available at: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true .\nslack:\n attachments: |\n [{\n \"title\": \"{{ .app.metadata.name}}\",\n \"title_link\":\"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}\",\n \"color\": \"#E96D76\",\n \"fields\": [\n {\n \"title\": \"Sync Status\",\n \"value\": \"{{.app.status.sync.status}}\",\n \"short\": true\n },\n {\n \"title\": \"Repository\",\n \"value\": \"{{.app.spec.source.repoURL}}\",\n \"short\": true\n }\n {{range $index, $c := .app.status.conditions}}\n {{if not $index}},{{end}}\n {{if $index}},{{end}}\n {\n \"title\": \"{{$c.type}}\",\n \"value\": \"{{$c.message}}\",\n \"short\": true\n }\n {{end}}\n ]\n }]\n deliveryPolicy: Post\n groupingKey: \"\"\n notifyBroadcast: false\nteams:\n facts: |\n [{\n \"name\": \"Sync Status\",\n \"value\": \"{{.app.status.sync.status}}\"\n },\n {\n \"name\": \"Failed at\",\n \"value\": \"{{.app.status.operationState.finishedAt}}\"\n },\n {\n \"name\": \"Repository\",\n \"value\": \"{{.app.spec.source.repoURL}}\"\n }\n {{range $index, $c := .app.status.conditions}}\n {{if not $index}},{{end}}\n {{if $index}},{{end}}\n {\n \"name\": \"{{$c.type}}\",\n \"value\": \"{{$c.message}}\"\n }\n {{end}}\n ]\n potentialAction: |-\n [{\n \"@type\":\"OpenUri\",\n \"name\":\"Open Operation\",\n \"targets\":[{\n \"os\":\"default\",\n \"uri\":\"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true\"\n }]\n },\n {\n \"@type\":\"OpenUri\",\n \"name\":\"Open Repository\",\n \"targets\":[{\n \"os\":\"default\",\n \"uri\":\"{{.app.spec.source.repoURL | call .repo.RepoURLToHTTPS}}\"\n }]\n }]\n themeColor: '#FF0000'\n title: Failed to sync application {{.app.metadata.name}}.", + "template.app-sync-running": "email:\n subject: Start syncing application {{.app.metadata.name}}.\nmessage: |\n The sync operation of application {{.app.metadata.name}} has started at {{.app.status.operationState.startedAt}}.\n Sync operation details are available at: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true .\nslack:\n attachments: |\n [{\n \"title\": \"{{ .app.metadata.name}}\",\n \"title_link\":\"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}\",\n \"color\": \"#0DADEA\",\n \"fields\": [\n {\n \"title\": \"Sync Status\",\n \"value\": \"{{.app.status.sync.status}}\",\n \"short\": true\n },\n {\n \"title\": \"Repository\",\n \"value\": \"{{.app.spec.source.repoURL}}\",\n \"short\": true\n }\n {{range $index, $c := .app.status.conditions}}\n {{if not $index}},{{end}}\n {{if $index}},{{end}}\n {\n \"title\": \"{{$c.type}}\",\n \"value\": \"{{$c.message}}\",\n \"short\": true\n }\n {{end}}\n ]\n }]\n deliveryPolicy: Post\n groupingKey: \"\"\n notifyBroadcast: false\nteams:\n facts: |\n [{\n \"name\": \"Sync Status\",\n \"value\": \"{{.app.status.sync.status}}\"\n },\n {\n \"name\": \"Started at\",\n \"value\": \"{{.app.status.operationState.startedAt}}\"\n },\n {\n \"name\": \"Repository\",\n \"value\": \"{{.app.spec.source.repoURL}}\"\n }\n {{range $index, $c := .app.status.conditions}}\n {{if not $index}},{{end}}\n {{if $index}},{{end}}\n {\n \"name\": \"{{$c.type}}\",\n \"value\": \"{{$c.message}}\"\n }\n {{end}}\n ]\n potentialAction: |-\n [{\n \"@type\":\"OpenUri\",\n \"name\":\"Open Operation\",\n \"targets\":[{\n \"os\":\"default\",\n \"uri\":\"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true\"\n }]\n },\n {\n \"@type\":\"OpenUri\",\n \"name\":\"Open Repository\",\n \"targets\":[{\n \"os\":\"default\",\n \"uri\":\"{{.app.spec.source.repoURL | call .repo.RepoURLToHTTPS}}\"\n }]\n }]\n title: Start syncing application {{.app.metadata.name}}.", + "template.app-sync-status-unknown": "email:\n subject: Application {{.app.metadata.name}} sync status is 'Unknown'\nmessage: |\n {{if eq .serviceType \"slack\"}}:exclamation:{{end}} Application {{.app.metadata.name}} sync is 'Unknown'.\n Application details: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}.\n {{if ne .serviceType \"slack\"}}\n {{range $c := .app.status.conditions}}\n * {{$c.message}}\n {{end}}\n {{end}}\nslack:\n attachments: |\n [{\n \"title\": \"{{ .app.metadata.name}}\",\n \"title_link\":\"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}\",\n \"color\": \"#E96D76\",\n \"fields\": [\n {\n \"title\": \"Sync Status\",\n \"value\": \"{{.app.status.sync.status}}\",\n \"short\": true\n },\n {\n \"title\": \"Repository\",\n \"value\": \"{{.app.spec.source.repoURL}}\",\n \"short\": true\n }\n {{range $index, $c := .app.status.conditions}}\n {{if not $index}},{{end}}\n {{if $index}},{{end}}\n {\n \"title\": \"{{$c.type}}\",\n \"value\": \"{{$c.message}}\",\n \"short\": true\n }\n {{end}}\n ]\n }]\n deliveryPolicy: Post\n groupingKey: \"\"\n notifyBroadcast: false\nteams:\n facts: |\n [{\n \"name\": \"Sync Status\",\n \"value\": \"{{.app.status.sync.status}}\"\n },\n {\n \"name\": \"Repository\",\n \"value\": \"{{.app.spec.source.repoURL}}\"\n }\n {{range $index, $c := .app.status.conditions}}\n {{if not $index}},{{end}}\n {{if $index}},{{end}}\n {\n \"name\": \"{{$c.type}}\",\n \"value\": \"{{$c.message}}\"\n }\n {{end}}\n ]\n potentialAction: |-\n [{\n \"@type\":\"OpenUri\",\n \"name\":\"Open Application\",\n \"targets\":[{\n \"os\":\"default\",\n \"uri\":\"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}\"\n }]\n },\n {\n \"@type\":\"OpenUri\",\n \"name\":\"Open Repository\",\n \"targets\":[{\n \"os\":\"default\",\n \"uri\":\"{{.app.spec.source.repoURL | call .repo.RepoURLToHTTPS}}\"\n }]\n }]\n title: Application {{.app.metadata.name}} sync status is 'Unknown'", + "template.app-sync-succeeded": "email:\n subject: Application {{.app.metadata.name}} has been successfully synced.\nmessage: |\n {{if eq .serviceType \"slack\"}}:white_check_mark:{{end}} Application {{.app.metadata.name}} has been successfully synced at {{.app.status.operationState.finishedAt}}.\n Sync operation details are available at: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true .\nslack:\n attachments: |\n [{\n \"title\": \"{{ .app.metadata.name}}\",\n \"title_link\":\"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}\",\n \"color\": \"#18be52\",\n \"fields\": [\n {\n \"title\": \"Sync Status\",\n \"value\": \"{{.app.status.sync.status}}\",\n \"short\": true\n },\n {\n \"title\": \"Repository\",\n \"value\": \"{{.app.spec.source.repoURL}}\",\n \"short\": true\n }\n {{range $index, $c := .app.status.conditions}}\n {{if not $index}},{{end}}\n {{if $index}},{{end}}\n {\n \"title\": \"{{$c.type}}\",\n \"value\": \"{{$c.message}}\",\n \"short\": true\n }\n {{end}}\n ]\n }]\n deliveryPolicy: Post\n groupingKey: \"\"\n notifyBroadcast: false\nteams:\n facts: |\n [{\n \"name\": \"Sync Status\",\n \"value\": \"{{.app.status.sync.status}}\"\n },\n {\n \"name\": \"Synced at\",\n \"value\": \"{{.app.status.operationState.finishedAt}}\"\n },\n {\n \"name\": \"Repository\",\n \"value\": \"{{.app.spec.source.repoURL}}\"\n }\n {{range $index, $c := .app.status.conditions}}\n {{if not $index}},{{end}}\n {{if $index}},{{end}}\n {\n \"name\": \"{{$c.type}}\",\n \"value\": \"{{$c.message}}\"\n }\n {{end}}\n ]\n potentialAction: |-\n [{\n \"@type\":\"OpenUri\",\n \"name\":\"Operation Details\",\n \"targets\":[{\n \"os\":\"default\",\n \"uri\":\"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true\"\n }]\n },\n {\n \"@type\":\"OpenUri\",\n \"name\":\"Open Repository\",\n \"targets\":[{\n \"os\":\"default\",\n \"uri\":\"{{.app.spec.source.repoURL | call .repo.RepoURLToHTTPS}}\"\n }]\n }]\n themeColor: '#000080'\n title: Application {{.app.metadata.name}} has been successfully synced" + }, + "triggers": { + "trigger.on-created": "- description: Application is created.\n oncePer: app.metadata.name\n send:\n - app-created\n when: \"true\"", + "trigger.on-deleted": "- description: Application is deleted.\n oncePer: app.metadata.name\n send:\n - app-deleted\n when: app.metadata.deletionTimestamp != nil", + "trigger.on-deployed": "- description: Application is synced and healthy. Triggered once per commit.\n oncePer: app.status.operationState.syncResult.revision\n send:\n - app-deployed\n when: app.status.operationState.phase in ['Succeeded'] and app.status.health.status\n == 'Healthy'", + "trigger.on-health-degraded": "- description: Application has degraded\n send:\n - app-health-degraded\n when: app.status.health.status == 'Degraded'", + "trigger.on-sync-failed": "- description: Application syncing has failed\n send:\n - app-sync-failed\n when: app.status.operationState.phase in ['Error', 'Failed']", + "trigger.on-sync-running": "- description: Application is being synced\n send:\n - app-sync-running\n when: app.status.operationState.phase in ['Running']", + "trigger.on-sync-status-unknown": "- description: Application status is 'Unknown'\n send:\n - app-sync-status-unknown\n when: app.status.sync.status == 'Unknown'", + "trigger.on-sync-succeeded": "- description: Application syncing has succeeded\n send:\n - app-sync-succeeded\n when: app.status.operationState.phase in ['Succeeded']" + } + } + }, + { + "apiVersion": "argoproj.io/v1beta1", "kind": "ArgoCD", "metadata": { "name": "argocd" @@ -123,35 +152,6 @@ metadata: } } }, - { - "apiVersion": "argoproj.io/v1alpha1", - "kind": "NotificationsConfiguration", - "metadata": { - "name": "default-notifications-configuration" - }, - "spec": { - "templates": { - "template.app-created": "email:\n subject: Application {{.app.metadata.name}} has been created.\nmessage: Application {{.app.metadata.name}} has been created.\nteams:\n title: Application {{.app.metadata.name}} has been created.", - "template.app-deleted": "email:\n subject: Application {{.app.metadata.name}} has been deleted.\nmessage: Application {{.app.metadata.name}} has been deleted.\nteams:\n title: Application {{.app.metadata.name}} has been deleted.", - "template.app-deployed": "email:\n subject: New version of an application {{.app.metadata.name}} is up and running.\nmessage: |\n {{if eq .serviceType \"slack\"}}:white_check_mark:{{end}} Application {{.app.metadata.name}} is now running new version of deployments manifests.\nslack:\n attachments: |\n [{\n \"title\": \"{{ .app.metadata.name}}\",\n \"title_link\":\"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}\",\n \"color\": \"#18be52\",\n \"fields\": [\n {\n \"title\": \"Sync Status\",\n \"value\": \"{{.app.status.sync.status}}\",\n \"short\": true\n },\n {\n \"title\": \"Repository\",\n \"value\": \"{{.app.spec.source.repoURL}}\",\n \"short\": true\n },\n {\n \"title\": \"Revision\",\n \"value\": \"{{.app.status.sync.revision}}\",\n \"short\": true\n }\n {{range $index, $c := .app.status.conditions}}\n {{if not $index}},{{end}}\n {{if $index}},{{end}}\n {\n \"title\": \"{{$c.type}}\",\n \"value\": \"{{$c.message}}\",\n \"short\": true\n }\n {{end}}\n ]\n }]\n deliveryPolicy: Post\n groupingKey: \"\"\n notifyBroadcast: false\nteams:\n facts: |\n [{\n \"name\": \"Sync Status\",\n \"value\": \"{{.app.status.sync.status}}\"\n },\n {\n \"name\": \"Repository\",\n \"value\": \"{{.app.spec.source.repoURL}}\"\n },\n {\n \"name\": \"Revision\",\n \"value\": \"{{.app.status.sync.revision}}\"\n }\n {{range $index, $c := .app.status.conditions}}\n {{if not $index}},{{end}}\n {{if $index}},{{end}}\n {\n \"name\": \"{{$c.type}}\",\n \"value\": \"{{$c.message}}\"\n }\n {{end}}\n ]\n potentialAction: |-\n [{\n \"@type\":\"OpenUri\",\n \"name\":\"Operation Application\",\n \"targets\":[{\n \"os\":\"default\",\n \"uri\":\"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}\"\n }]\n },\n {\n \"@type\":\"OpenUri\",\n \"name\":\"Open Repository\",\n \"targets\":[{\n \"os\":\"default\",\n \"uri\":\"{{.app.spec.source.repoURL | call .repo.RepoURLToHTTPS}}\"\n }]\n }]\n themeColor: '#000080'\n title: New version of an application {{.app.metadata.name}} is up and running.", - "template.app-health-degraded": "email:\n subject: Application {{.app.metadata.name}} has degraded.\nmessage: |\n {{if eq .serviceType \"slack\"}}:exclamation:{{end}} Application {{.app.metadata.name}} has degraded.\n Application details: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}.\nslack:\n attachments: |\n [{\n \"title\": \"{{ .app.metadata.name}}\",\n \"title_link\": \"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}\",\n \"color\": \"#f4c030\",\n \"fields\": [\n {\n \"title\": \"Health Status\",\n \"value\": \"{{.app.status.health.status}}\",\n \"short\": true\n },\n {\n \"title\": \"Repository\",\n \"value\": \"{{.app.spec.source.repoURL}}\",\n \"short\": true\n }\n {{range $index, $c := .app.status.conditions}}\n {{if not $index}},{{end}}\n {{if $index}},{{end}}\n {\n \"title\": \"{{$c.type}}\",\n \"value\": \"{{$c.message}}\",\n \"short\": true\n }\n {{end}}\n ]\n }]\n deliveryPolicy: Post\n groupingKey: \"\"\n notifyBroadcast: false\nteams:\n facts: |\n [{\n \"name\": \"Health Status\",\n \"value\": \"{{.app.status.health.status}}\"\n },\n {\n \"name\": \"Repository\",\n \"value\": \"{{.app.spec.source.repoURL}}\"\n }\n {{range $index, $c := .app.status.conditions}}\n {{if not $index}},{{end}}\n {{if $index}},{{end}}\n {\n \"name\": \"{{$c.type}}\",\n \"value\": \"{{$c.message}}\"\n }\n {{end}}\n ]\n potentialAction: |\n [{\n \"@type\":\"OpenUri\",\n \"name\":\"Open Application\",\n \"targets\":[{\n \"os\":\"default\",\n \"uri\":\"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}\"\n }]\n },\n {\n \"@type\":\"OpenUri\",\n \"name\":\"Open Repository\",\n \"targets\":[{\n \"os\":\"default\",\n \"uri\":\"{{.app.spec.source.repoURL | call .repo.RepoURLToHTTPS}}\"\n }]\n }]\n themeColor: '#FF0000'\n title: Application {{.app.metadata.name}} has degraded.", - "template.app-sync-failed": "email:\n subject: Failed to sync application {{.app.metadata.name}}.\nmessage: |\n {{if eq .serviceType \"slack\"}}:exclamation:{{end}} The sync operation of application {{.app.metadata.name}} has failed at {{.app.status.operationState.finishedAt}} with the following error: {{.app.status.operationState.message}}\n Sync operation details are available at: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true .\nslack:\n attachments: |\n [{\n \"title\": \"{{ .app.metadata.name}}\",\n \"title_link\":\"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}\",\n \"color\": \"#E96D76\",\n \"fields\": [\n {\n \"title\": \"Sync Status\",\n \"value\": \"{{.app.status.sync.status}}\",\n \"short\": true\n },\n {\n \"title\": \"Repository\",\n \"value\": \"{{.app.spec.source.repoURL}}\",\n \"short\": true\n }\n {{range $index, $c := .app.status.conditions}}\n {{if not $index}},{{end}}\n {{if $index}},{{end}}\n {\n \"title\": \"{{$c.type}}\",\n \"value\": \"{{$c.message}}\",\n \"short\": true\n }\n {{end}}\n ]\n }]\n deliveryPolicy: Post\n groupingKey: \"\"\n notifyBroadcast: false\nteams:\n facts: |\n [{\n \"name\": \"Sync Status\",\n \"value\": \"{{.app.status.sync.status}}\"\n },\n {\n \"name\": \"Failed at\",\n \"value\": \"{{.app.status.operationState.finishedAt}}\"\n },\n {\n \"name\": \"Repository\",\n \"value\": \"{{.app.spec.source.repoURL}}\"\n }\n {{range $index, $c := .app.status.conditions}}\n {{if not $index}},{{end}}\n {{if $index}},{{end}}\n {\n \"name\": \"{{$c.type}}\",\n \"value\": \"{{$c.message}}\"\n }\n {{end}}\n ]\n potentialAction: |-\n [{\n \"@type\":\"OpenUri\",\n \"name\":\"Open Operation\",\n \"targets\":[{\n \"os\":\"default\",\n \"uri\":\"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true\"\n }]\n },\n {\n \"@type\":\"OpenUri\",\n \"name\":\"Open Repository\",\n \"targets\":[{\n \"os\":\"default\",\n \"uri\":\"{{.app.spec.source.repoURL | call .repo.RepoURLToHTTPS}}\"\n }]\n }]\n themeColor: '#FF0000'\n title: Failed to sync application {{.app.metadata.name}}.", - "template.app-sync-running": "email:\n subject: Start syncing application {{.app.metadata.name}}.\nmessage: |\n The sync operation of application {{.app.metadata.name}} has started at {{.app.status.operationState.startedAt}}.\n Sync operation details are available at: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true .\nslack:\n attachments: |\n [{\n \"title\": \"{{ .app.metadata.name}}\",\n \"title_link\":\"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}\",\n \"color\": \"#0DADEA\",\n \"fields\": [\n {\n \"title\": \"Sync Status\",\n \"value\": \"{{.app.status.sync.status}}\",\n \"short\": true\n },\n {\n \"title\": \"Repository\",\n \"value\": \"{{.app.spec.source.repoURL}}\",\n \"short\": true\n }\n {{range $index, $c := .app.status.conditions}}\n {{if not $index}},{{end}}\n {{if $index}},{{end}}\n {\n \"title\": \"{{$c.type}}\",\n \"value\": \"{{$c.message}}\",\n \"short\": true\n }\n {{end}}\n ]\n }]\n deliveryPolicy: Post\n groupingKey: \"\"\n notifyBroadcast: false\nteams:\n facts: |\n [{\n \"name\": \"Sync Status\",\n \"value\": \"{{.app.status.sync.status}}\"\n },\n {\n \"name\": \"Started at\",\n \"value\": \"{{.app.status.operationState.startedAt}}\"\n },\n {\n \"name\": \"Repository\",\n \"value\": \"{{.app.spec.source.repoURL}}\"\n }\n {{range $index, $c := .app.status.conditions}}\n {{if not $index}},{{end}}\n {{if $index}},{{end}}\n {\n \"name\": \"{{$c.type}}\",\n \"value\": \"{{$c.message}}\"\n }\n {{end}}\n ]\n potentialAction: |-\n [{\n \"@type\":\"OpenUri\",\n \"name\":\"Open Operation\",\n \"targets\":[{\n \"os\":\"default\",\n \"uri\":\"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true\"\n }]\n },\n {\n \"@type\":\"OpenUri\",\n \"name\":\"Open Repository\",\n \"targets\":[{\n \"os\":\"default\",\n \"uri\":\"{{.app.spec.source.repoURL | call .repo.RepoURLToHTTPS}}\"\n }]\n }]\n title: Start syncing application {{.app.metadata.name}}.", - "template.app-sync-status-unknown": "email:\n subject: Application {{.app.metadata.name}} sync status is 'Unknown'\nmessage: |\n {{if eq .serviceType \"slack\"}}:exclamation:{{end}} Application {{.app.metadata.name}} sync is 'Unknown'.\n Application details: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}.\n {{if ne .serviceType \"slack\"}}\n {{range $c := .app.status.conditions}}\n * {{$c.message}}\n {{end}}\n {{end}}\nslack:\n attachments: |\n [{\n \"title\": \"{{ .app.metadata.name}}\",\n \"title_link\":\"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}\",\n \"color\": \"#E96D76\",\n \"fields\": [\n {\n \"title\": \"Sync Status\",\n \"value\": \"{{.app.status.sync.status}}\",\n \"short\": true\n },\n {\n \"title\": \"Repository\",\n \"value\": \"{{.app.spec.source.repoURL}}\",\n \"short\": true\n }\n {{range $index, $c := .app.status.conditions}}\n {{if not $index}},{{end}}\n {{if $index}},{{end}}\n {\n \"title\": \"{{$c.type}}\",\n \"value\": \"{{$c.message}}\",\n \"short\": true\n }\n {{end}}\n ]\n }]\n deliveryPolicy: Post\n groupingKey: \"\"\n notifyBroadcast: false\nteams:\n facts: |\n [{\n \"name\": \"Sync Status\",\n \"value\": \"{{.app.status.sync.status}}\"\n },\n {\n \"name\": \"Repository\",\n \"value\": \"{{.app.spec.source.repoURL}}\"\n }\n {{range $index, $c := .app.status.conditions}}\n {{if not $index}},{{end}}\n {{if $index}},{{end}}\n {\n \"name\": \"{{$c.type}}\",\n \"value\": \"{{$c.message}}\"\n }\n {{end}}\n ]\n potentialAction: |-\n [{\n \"@type\":\"OpenUri\",\n \"name\":\"Open Application\",\n \"targets\":[{\n \"os\":\"default\",\n \"uri\":\"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}\"\n }]\n },\n {\n \"@type\":\"OpenUri\",\n \"name\":\"Open Repository\",\n \"targets\":[{\n \"os\":\"default\",\n \"uri\":\"{{.app.spec.source.repoURL | call .repo.RepoURLToHTTPS}}\"\n }]\n }]\n title: Application {{.app.metadata.name}} sync status is 'Unknown'", - "template.app-sync-succeeded": "email:\n subject: Application {{.app.metadata.name}} has been successfully synced.\nmessage: |\n {{if eq .serviceType \"slack\"}}:white_check_mark:{{end}} Application {{.app.metadata.name}} has been successfully synced at {{.app.status.operationState.finishedAt}}.\n Sync operation details are available at: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true .\nslack:\n attachments: |\n [{\n \"title\": \"{{ .app.metadata.name}}\",\n \"title_link\":\"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}\",\n \"color\": \"#18be52\",\n \"fields\": [\n {\n \"title\": \"Sync Status\",\n \"value\": \"{{.app.status.sync.status}}\",\n \"short\": true\n },\n {\n \"title\": \"Repository\",\n \"value\": \"{{.app.spec.source.repoURL}}\",\n \"short\": true\n }\n {{range $index, $c := .app.status.conditions}}\n {{if not $index}},{{end}}\n {{if $index}},{{end}}\n {\n \"title\": \"{{$c.type}}\",\n \"value\": \"{{$c.message}}\",\n \"short\": true\n }\n {{end}}\n ]\n }]\n deliveryPolicy: Post\n groupingKey: \"\"\n notifyBroadcast: false\nteams:\n facts: |\n [{\n \"name\": \"Sync Status\",\n \"value\": \"{{.app.status.sync.status}}\"\n },\n {\n \"name\": \"Synced at\",\n \"value\": \"{{.app.status.operationState.finishedAt}}\"\n },\n {\n \"name\": \"Repository\",\n \"value\": \"{{.app.spec.source.repoURL}}\"\n }\n {{range $index, $c := .app.status.conditions}}\n {{if not $index}},{{end}}\n {{if $index}},{{end}}\n {\n \"name\": \"{{$c.type}}\",\n \"value\": \"{{$c.message}}\"\n }\n {{end}}\n ]\n potentialAction: |-\n [{\n \"@type\":\"OpenUri\",\n \"name\":\"Operation Details\",\n \"targets\":[{\n \"os\":\"default\",\n \"uri\":\"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true\"\n }]\n },\n {\n \"@type\":\"OpenUri\",\n \"name\":\"Open Repository\",\n \"targets\":[{\n \"os\":\"default\",\n \"uri\":\"{{.app.spec.source.repoURL | call .repo.RepoURLToHTTPS}}\"\n }]\n }]\n themeColor: '#000080'\n title: Application {{.app.metadata.name}} has been successfully synced" - }, - "triggers": { - "trigger.on-created": "- description: Application is created.\n oncePer: app.metadata.name\n send:\n - app-created\n when: \"true\"", - "trigger.on-deleted": "- description: Application is deleted.\n oncePer: app.metadata.name\n send:\n - app-deleted\n when: app.metadata.deletionTimestamp != nil", - "trigger.on-deployed": "- description: Application is synced and healthy. Triggered once per commit.\n oncePer: app.status.operationState.syncResult.revision\n send:\n - app-deployed\n when: app.status.operationState.phase in ['Succeeded'] and app.status.health.status\n == 'Healthy'", - "trigger.on-health-degraded": "- description: Application has degraded\n send:\n - app-health-degraded\n when: app.status.health.status == 'Degraded'", - "trigger.on-sync-failed": "- description: Application syncing has failed\n send:\n - app-sync-failed\n when: app.status.operationState.phase in ['Error', 'Failed']", - "trigger.on-sync-running": "- description: Application is being synced\n send:\n - app-sync-running\n when: app.status.operationState.phase in ['Running']", - "trigger.on-sync-status-unknown": "- description: Application status is 'Unknown'\n send:\n - app-sync-status-unknown\n when: app.status.sync.status == 'Unknown'", - "trigger.on-sync-succeeded": "- description: Application syncing has succeeded\n send:\n - app-sync-succeeded\n when: app.status.operationState.phase in ['Succeeded']" - } - } - }, { "apiVersion": "pipelines.openshift.io/v1alpha1", "kind": "GitopsService", @@ -166,6 +166,13 @@ metadata: containerImage: quay.io/redhat-developer/gitops-operator description: Enables teams to adopt GitOps principles for managing cluster configurations and application delivery across hybrid multi-cluster Kubernetes environments. + features.operators.openshift.io/disconnected: "true" + features.operators.openshift.io/fips-compliant: "false" + features.operators.openshift.io/proxy-aware: "true" + features.operators.openshift.io/tls-profiles: "false" + features.operators.openshift.io/token-auth-aws: "false" + features.operators.openshift.io/token-auth-azure: "false" + features.operators.openshift.io/token-auth-gcp: "false" operatorframework.io/cluster-monitoring: "true" operatorframework.io/suggested-namespace: openshift-gitops-operator operators.openshift.io/infrastructure-features: '["disconnected"]' diff --git a/config/manifests/bases/gitops-operator.clusterserviceversion.yaml b/config/manifests/bases/gitops-operator.clusterserviceversion.yaml index 774fc8875..0326d3115 100644 --- a/config/manifests/bases/gitops-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/gitops-operator.clusterserviceversion.yaml @@ -7,6 +7,13 @@ metadata: containerImage: quay.io/redhat-developer/gitops-operator description: Enables teams to adopt GitOps principles for managing cluster configurations and application delivery across hybrid multi-cluster Kubernetes environments. + features.operators.openshift.io/disconnected: "true" + features.operators.openshift.io/fips-compliant: "false" + features.operators.openshift.io/proxy-aware: "true" + features.operators.openshift.io/tls-profiles: "false" + features.operators.openshift.io/token-auth-aws: "false" + features.operators.openshift.io/token-auth-azure: "false" + features.operators.openshift.io/token-auth-gcp: "false" operatorframework.io/cluster-monitoring: "true" operatorframework.io/suggested-namespace: openshift-gitops-operator operators.openshift.io/infrastructure-features: '["disconnected"]' diff --git a/config/samples/argoproj.io_v1beta1_argocd.yaml b/config/samples/argoproj.io_v1beta1_argocd.yaml index cc02629c4..986e61960 100644 --- a/config/samples/argoproj.io_v1beta1_argocd.yaml +++ b/config/samples/argoproj.io_v1beta1_argocd.yaml @@ -1,7 +1,7 @@ apiVersion: argoproj.io/v1beta1 kind: ArgoCD metadata: - name: argocd-sample + name: argocd spec: server: resources: @@ -17,10 +17,21 @@ spec: resources: limits: cpu: 1000m - memory: 512Mi + memory: 1024Mi requests: cpu: 250m memory: 256Mi + sso: + provider: dex + dex: + openShiftOAuth: true + resources: + limits: + cpu: 500m + memory: 256Mi + requests: + cpu: 250m + memory: 128Mi ha: enabled: false resources: @@ -30,6 +41,11 @@ spec: requests: cpu: 250m memory: 128Mi + rbac: + defaultPolicy: '' + policy: | + g, system:cluster-admins, role:admin + scopes: '[groups]' redis: resources: limits: @@ -38,16 +54,14 @@ spec: requests: cpu: 250m memory: 128Mi - sso: - provider: dex - dex: - resources: - limits: - cpu: 500m - memory: 256Mi - requests: - cpu: 250m - memory: 128Mi + resourceExclusions: | + - apiGroups: + - tekton.dev + clusters: + - '*' + kinds: + - TaskRun + - PipelineRun controller: resources: limits: diff --git a/config/samples/kustomization.yaml b/config/samples/kustomization.yaml index 24811739b..d95bfef97 100644 --- a/config/samples/kustomization.yaml +++ b/config/samples/kustomization.yaml @@ -1,7 +1,7 @@ ## Append samples you want in your CSV to this file as resources ## resources: - pipelines_v1alpha1_gitopsservice.yaml -- argoproj.io_v1alpha1_argocd.yaml +- argoproj.io_v1beta1_argocd.yaml - argoproj.io_v1alpha1_application.yaml - argoproj.io_v1alpha1_applicationset.yaml - argoproj.io_v1alpha1_appproject.yaml