Граф коммитов

81 Коммитов

Автор SHA1 Сообщение Дата
Nitish Malhotra 259e906371
Nitishm/bug/409/custom reverse workflow crash (#410)
* Custom executor example

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>

* Instantiate CustomReverse executor with the image instance

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>
2021-11-12 11:38:53 -08:00
Nitish Malhotra 12d0f46e8b
Add workflow generator for custom executor (#406) 2021-11-06 10:23:10 -07:00
Nitish Malhotra a4134302fc
Added new charts and keptn example (#394)
* Added new charts and keptn example

- Added keptn-addons chart to orkestra. Addons include prometheus
  service and job executor services for keptn
- Created a new bookinfo example with istio (WIP)

TODO:
- Add keptn resources to bookinfo info example with istio

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>

* Manual keptn testing and configurations

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>

* Fix parameter configmap flag for keptn executor

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>

* Add keptn configmap for bookinfo example

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>

* fix bug where reverse executor does not carry forward the task params

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>

* Add README.md

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>

* Address review comments

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>

* Address comments

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>

* Reorder README.md

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>

Co-authored-by: Jonathan Innis <jonathan.innis.ji@gmail.com>
2021-10-05 14:40:10 -07:00
Jonathan Innis 6af0807bcf
Fix deepcopy calls (#396) 2021-10-05 14:13:04 -07:00
Jonathan Innis 2e25586451
Add Executor Node Logic to Graph (#381)
* Add executor node logic to graph

* Fix template test failure

* Fix tests

* Add additional parameter support to workflow
2021-09-24 13:34:50 -07:00
Jonathan Innis 363b8a8946
Use a Workflow Status Thread Rather than Short Requeue (#382)
* Add tracking for previous applications

* Add purging logic with list

* Fix failing test case

* Fix failing test case

* Add new func test cases

* Add get diff functionality to graph

* Create a rollback new application workflow

* Combine the purge of newer applications with rollback workflow

* Create an executor interface for creating templates

* Increase default workflow executor version

* Use a workflow reconciler to update app group status

* Add finalizer to catch deletion

* Fix calling both rollback and reverse

* Add rolledback status to json printer

* Fix reverse workflow not working properly
2021-09-24 09:38:42 -07:00
Jonathan Innis b7b480a7e6
Purge Newer Applications Deployed on Rollback (#352)
* Add tracking for previous applications

* Add purging logic with list

* Fix failing test case

* Fix failing test case

* Add new func test cases

* Add get diff functionality to graph

* Create a rollback new application workflow

* Combine the purge of newer applications with rollback workflow

* Create an executor interface for creating templates

* Increase default workflow executor version
2021-09-01 09:28:00 -07:00
Jonathan Innis dd0e111fe2
Fix security vulnerabilities and upgrade deps (#376) 2021-08-31 08:27:47 -07:00
Jonathan Innis 5da5590041
Refactor the DAG application logic into Graph (#371)
* Refactor the DAG application logic into the graph creation

* Refactor the DAG application logic into the graph creation

* Add graph testing
2021-08-26 14:00:35 -07:00
Rajwinder Mahal 02f248c2ba
Fix invalid pointer and slice bug in Graph.bft() (#350) 2021-06-25 21:26:36 -07:00
Nitish Malhotra d2c214a978
Bump up default executor version to v0.4.1 (#348) 2021-06-24 00:52:30 -07:00
Jonathan Innis e822ad1e58
Upgrade Executor to Version v0.4.0 (#347)
* Upgrade executor version

* Fix testcase timeout

* Change default interval to 1s
2021-06-23 22:53:22 -07:00
Rajwinder Mahal f33137a05c
[WIP] Add tests for graph.go (#334) 2021-06-22 22:54:19 -07:00
Nitish Malhotra 49631d9867
Nitishm/bug/344/finalizer check (#346)
* Fix finalizer check

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>

* Another fix to reverse

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>
2021-06-22 13:35:04 -07:00
Rajwinder Mahal e3d795770d
Refactor + unit tests for pkg/workflow/templates.go (#339) 2021-06-20 10:44:57 -07:00
Rajwinder Mahal 2111de4fa9
Refactor ConvertToDNS1123() (#335) 2021-06-17 13:33:03 -07:00
Jonathan Innis 53f99f3e8c
Remove unused code in rollback (#330) 2021-06-16 10:33:12 -07:00
Jonathan Innis 64ded4a495
Improve Conditions Returned By ApplicationGroup (#313)
* Add error conditions, create rollback workflow client

* Fix patching the status

* Update CRD status names

* Fix golint errors

* Fix rollback testing scenarios

* Fix PR comments

* Fix error returned in condition

* Remove duplicate logging, only log at top level
2021-06-16 09:48:23 -07:00
Nitish Malhotra 9e6538d5e3
Disable subchart decomposition if subchart field nil/empty (#325) 2021-06-15 19:40:49 -07:00
Rajwinder Mahal ec6c417c8c
Fix bug where IsFileYaml() returns true if non yaml file's extension contains suffix yaml or yml (#327)
* Fix IsFileYaml bug

* Fix typo
2021-06-14 20:43:48 -07:00
Rajwinder Mahal 47d8dc34e4
Upgrade to Argo v3.0.7 (#318)
* Upgrade to Argo v3.0.7

* Upgrade to Argo v3.0.7

* Update operators section in docs to include argo-workflows chart options

* Update operators section in docs to include latest orkestra chart options
2021-06-14 15:47:05 -07:00
Rajwinder Mahal 8b0dcf83ec
Fix generated release name for apps and subcharts (#317)
* Fix generated release name

* Fix typo
2021-06-13 23:29:33 -07:00
Rajwinder Mahal e30ea47b26
Update ConvertToDNS1123() to validate and fix other special characters, max len and starts-with rules (#298)
* Update ConvertToDNS1123 helper function

* Update ConvertDNS1123() to handle corner cases

* Move consts to consts.go file

Co-authored-by: Nitish Malhotra <nitish.malhotra@gmail.com>
2021-06-11 10:14:51 -07:00
Jonathan Innis 48b937bac2
Refactor Workflow into a Builder Construct (#284)
* Add additional test, short name, cleanup

* Try rollback scenario

* Add rollback testing

* Fix timeout on testing

* Increase timeout

* Cleanup reconciler code

* Remove using last successful annotation in reconciler struct

* Fix test failures

* Cleanup status and workflow generator

* Changes for using action parameter of orkestra workflow executor (#230)

* Changes for using action parameter of orkestra workflow executor

* Base64 encode reverse workflow helm release string

* Resolved PR feedback

* Rebased with the latest main

* Changed action strings to lower-case. Removed ExecutorAction.String() method

* 1) Updated executor image tag to v0.3.0 2) Rebased with the latest main

Co-authored-by: Davut Karabay <davutk@microsoft.com>

* Fix status updates

* Add lastSucceededGeneration for progressing check

* Fix update scenario

* Refactor workflow

* Fix rollback scenario

* Use a builder for workflows

* Cleanup workflow into package

* Add test case

* Fix PR comments

Co-authored-by: davutkarabay <47837266+davutkarabay@users.noreply.github.com>
Co-authored-by: Davut Karabay <davutk@microsoft.com>
Co-authored-by: Nitish Malhotra <nitish.malhotra@gmail.com>
2021-06-11 07:54:22 -07:00
Jonathan Innis a28b3648d2
Cleanup Reconciler with Refactored Code Portions (#272)
* Add additional test, short name, cleanup

* Try rollback scenario

* Add rollback testing

* Fix timeout on testing

* Increase timeout

* Cleanup reconciler code

* Remove using last successful annotation in reconciler struct

* Fix test failures

* Cleanup status and workflow generator

* Changes for using action parameter of orkestra workflow executor (#230)

* Changes for using action parameter of orkestra workflow executor

* Base64 encode reverse workflow helm release string

* Resolved PR feedback

* Rebased with the latest main

* Changed action strings to lower-case. Removed ExecutorAction.String() method

* 1) Updated executor image tag to v0.3.0 2) Rebased with the latest main

Co-authored-by: Davut Karabay <davutk@microsoft.com>

* Fix status updates

* Add lastSucceededGeneration for progressing check

* Fix update scenario

* Fix rollback scenario

* Restructure into status and reconcile helpers

* Move status to meta pkg

* Address PR comments

Co-authored-by: davutkarabay <47837266+davutkarabay@users.noreply.github.com>
Co-authored-by: Davut Karabay <davutk@microsoft.com>
2021-06-08 21:56:15 -07:00
Rajwinder Mahal 0f2012f895
Generate a unique prefix instead of initials when naming subcharts (#283)
* Generate unique prefix when naming subcharts

* Limit max chart name len to 63 chars

* Refactor code

* Update pkg/utils/chart.go

Co-authored-by: Nitish Malhotra <nitish.malhotra@gmail.com>

Co-authored-by: Nitish Malhotra <nitish.malhotra@gmail.com>
2021-06-08 21:05:56 -07:00
Jonathan Innis 525863d051
Update argo.go 2021-06-03 07:54:02 -07:00
Jonathan Innis 1eb038f6c5
Add Rollback Create Testing (#267)
* Add additional test, short name, cleanup

* Try rollback scenario

* Add rollback testing

* Fix timeout on testing

* Increase timeout

* Remove using last successful annotation in reconciler struct

* Fix test failures

* Address overwriting annotations

* Split namespaces for separating test cases

* Add ginkgo -p for parallelization

* Use a name override to prevent conflict

* Bookinfo v2

* Seed the rng

* Fix false check on notfound

* Install crd for testing separately

* Add parellelization later

Co-authored-by: Nitish Malhotra <nitish.malhotra@gmail.com>
2021-06-03 07:52:47 -07:00
davutkarabay 1344e26445
Changes for using action parameter of orkestra workflow executor (#230)
* Changes for using action parameter of orkestra workflow executor

* Base64 encode reverse workflow helm release string

* Resolved PR feedback

* Rebased with the latest main

* Changed action strings to lower-case. Removed ExecutorAction.String() method

* 1) Updated executor image tag to v0.3.0 2) Rebased with the latest main

Co-authored-by: Davut Karabay <davutk@microsoft.com>
2021-05-28 13:30:07 -07:00
Jonathan Innis 58d1761afc
Add Debug Makefile Target and Debug mode for Controller (#256)
* Add debug mode to controller for local testing

* Use the local flag instead of mode

* Clean makefile targets

* Make debug level env & skip kind error

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>

Co-authored-by: Nitish Malhotra <nitish.malhotra@gmail.com>
2021-05-24 10:01:50 -07:00
Jonathan Innis dcf446d00c
Cleanup the Argo Package and Move AppGroup consts to AppGroup Types (#247)
* Cleanup the argo pkg with consts and utils

* Fix failing e2e

* Fix fmt issue

* Move pkg into utils

* Don't export test constants

* Don't export test constants
2021-05-20 10:10:46 -07:00
Jonathan Innis 683fc3f435
Integrate Helm Controller Structs into the AppGroup Spec (#255) 2021-05-18 21:36:49 -07:00
Jonathan Innis 429d372278
Additional Create/Update Testing (#246)
* Add debug flag

* Add additional create/update testing

* Increase executor version, add args

* Remove makefile change

* Fix fmt issues

* Remove debug flag

Co-authored-by: Nitish Malhotra <nitish.malhotra@gmail.com>
2021-05-18 14:42:13 -07:00
Nitish Malhotra 61bba08930
Convert app chart name to dns1123 comp when staging (#244)
Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>
2021-05-18 11:53:17 -07:00
Nitish Malhotra c87c792da4
Pass disableWait flag from app to subchart helmrelease (#243)
* Pass disableWait flag from app to subchart helmrelease

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>

* Check for nil

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>

* Check for nil - contd...

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>
2021-05-17 21:08:54 -07:00
Nitish Malhotra 6f82284ff8
Use release.timeout as the timeout for the defaultExecutor (#229)
Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>
2021-05-12 09:02:27 -07:00
Nitish Malhotra de882016fa
Find max interval to use as defaultExecutor timout (#227)
Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>
2021-05-11 12:14:53 -07:00
Jonathan Innis 7f845c3e77
Fix CrashLoopBackoff when starting Orkestra (#221) 2021-05-10 23:36:57 -07:00
Nitish Malhotra 22d379ddd9
Generate unique names for reverse wf nodes (#219) 2021-05-10 22:45:51 -07:00
Nitish Malhotra e2c942dedf
Davutkarabay/reversal workflow 2 (#206)
* Initial changes for reversal workflow

* Resolved PR feedback. Unified the wording from Reversal to Reverse

* Resolved PR feedback

* Resolved PR feedback

* Changes after rebasing with main

* Fixed lint error

* Don't use double pointer argument to initWorkflowObject function

* Pass forward workflow object as argument instead of application group object to GenerateReverse and SubmitReverse functions

* Resolved PR feedback

* Fix the issue that reverse wf finalizer was not removed from the forward wf. Resolved PR feedback too

* Added reversing condition to reconcile on reversal using shorter default duration

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>

* Changes based on PR feedback

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>

* Generate manifests after removing reversing cond

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>

* Replace wf finalizer with simple deletes on completion

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>

Co-authored-by: Davut Karabay <davutk@microsoft.com>
Co-authored-by: Jonathan Innis <jonathan.innis.ji@gmail.com>
2021-05-07 12:56:11 -07:00
Nitish Malhotra 73cc63c460
Setup for EnvTest and usage with CI (#200)
* Setup for EnvTest and usage with CI

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>

* Github actions support

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>

* Remove go job from azure pipeline

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>
2021-05-04 17:26:56 -07:00
Nitish Malhotra 9279f33f62
Cleanup workflow pods on workflow success (#187)
Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>
2021-04-28 13:18:38 -07:00
Jonathan Innis ef80a788c2
Integrate Helm Controller and Remove Helm Operator (#181)
* Start helm controller integration

* Add helmrelease to scheme

* Add a custom poller for applying and checking helmreleases

* Update exectuor image

* Remove last helm operator ref

* Update go mod

* Added namesapce creation to executor

* Change naming to fluxhelmv2beta1

* Update the executor for upgrade scenario

* Remove helm uninstall

* Use logrus instead of print

* Make timeout come from argo workflow piece, change chart location

* Remove helm operator from chart values

* Fix lint issues

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>

* Fix failed tests

Co-authored-by: Nitish Malhotra <nitish.malhotra@gmail.com>
2021-04-28 12:40:59 -07:00
Nitish Malhotra 0cd5b40b59
Add probes to deployment and probe server to ctrlr (#178)
* Add probes to deployment and probe server to ctrlr

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>

* Lint error

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>
2021-04-26 11:43:29 -07:00
Nitish Malhotra 5cd449501d
[WIP] Configure pod parallelism to higher value (#174)
* Configure pod parallelism to higher value

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>

* Make timeout a readable string

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>

* Make parallelism configurable

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>

* Pass parallelism to workflow templates

This commit also removes HelmRelease overrides for wait and timeout.

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>

* Expose helm-operator values for workers in parallel

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>

* Increase helm-operator workers to 10

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>
2021-04-23 10:05:23 -07:00
Nitish Malhotra f0e08bef38
Create target dir if it doesnt exist (#166)
* Create target dir if it doesnt exist

Closes #149

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>

* golangci-lint error

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>

* check for nil successful spec

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>
2021-04-22 10:01:11 -07:00
Nitish Malhotra 303cb5269f
Nitishm/bug/164/support any ns (#165)
* Okteto yaml for delve based debugging on a live cluster

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>

* Fix Tiltfile failures

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>

* Added support for any namespace to deploy orkestra

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>
2021-04-20 11:48:35 -07:00
Jonathan Innis 7b79374a25
Add Conditions Object to Statuses of AppGroup (#157)
* Add conditions to the application group status

* Fixing bugs in the build

* Updating with other condition types

* Adding condition type for workflow and application group reconciliation

* Remove unneded progressing call

* Surface condition objects for the underlying subcharts

* Cleanup getting chart status code

* Fix bug in checking generation for update

* Move observed generation update

* CRD update u=in charts dir

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>

* Patch instead of update to prevent conflict

* Fix a couple patch bugs

* Remove spcl handing of terminating ns

No special handing of terminating ns
Fixed bug in handleRemediation

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>

Co-authored-by: Nitish Malhotra <nitish.malhotra@gmail.com>
2021-04-15 11:32:15 -07:00
Jonathan Innis 246945c7eb
Remove Checksum in Favor of Generation Comparison (#154)
* Remove the need for checksum, use generation

* Update the chart cr as well

* Change the name to observedGeneration

* Fix making the crd definition
2021-04-12 12:48:56 -07:00
Jonathan Innis 2af4c4c746
Integrate HelmRelease into the Application Spec (#151)
* Update spec with helmRelease spec values

* Update samples

* Remove unneeded fields and update api

* Add description for api types for application spec

* Update naming to authSecretRef

* API changes to Release field

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>

* Remove GroupID field

Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>

Co-authored-by: Nitish Malhotra <nitish.malhotra@gmail.com>
2021-04-10 15:27:44 -07:00