orkestra/main.go

206 строки
7.0 KiB
Go
Исходник Обычный вид История

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
package main
import (
"context"
"flag"
"os"
"time"
"github.com/Azure/Orkestra/pkg/utils"
Merge dev branch into main (#36) * feat: Initialise application controller with chart pull & push functionality (#16) * feat: init application reconciler Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * use controller-gen 0.2.9 Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * fix:ci Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: introduct groupName Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add groupID Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add fetch function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add fetch function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * add test for AB#13 Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * initiate push logic Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: complete push function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: add configuration Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * fix: golangcilint and tests Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: change branch name pattern to dev (#23) * retrigger pipeline Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * Nitishm/feature/ab#15/appgroup reconciler scaffold (#25) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Scaffolding for application group reconciler Created the reconciler method for ApplicationGroup controller Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Added reconciler lookup functionality Base functionality of application reconciler. Still needs the generation functions for Argo Workflow object. Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Workflow interface and appgroup reconciler features Added a bunch of changes to this commit: - Created a Workflow engine interface to support any type of workflow engine - Added logic to appgroup_reconciler. Mostly WIP but sets the skeleton for the upcoming commits. Fixes ab#21 Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> feat: AppGroup reconciler update TODO: - Generate the HelmRelease object - Set the executor template Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> feat: ApplicationGroup first pass dev complete - Needs more unit tests - Not yet fit for usage Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Added unit tests (incomplete WIP) WIP UTs for ApplicationGroup functions: Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix go.mod errors (#26) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Application and ApplicationReconciler and supported packages into dev branch (#28) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Nitishm/feat/chart/push (#31) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Fixed lint errors and test failures (#33) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * chore: Update docker targets in Make and comment cleanup (#34) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Docker target changes and TODO comment cleanup Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * [chore] Helm chart for orkestra and relevant changes (#35) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Docker target changes and TODO comment cleanup Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Helm chart for orkestra and related changes - Created the helm chart for orkestra - Made relevant changes based on feedback from running it on the cluster Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Create example dir and edits to README.md Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update example and set ownersreference for helmrelease Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix argo tests failures from previous set of changes Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint error in argo test Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com>
2021-02-03 05:49:42 +03:00
"github.com/Azure/Orkestra/pkg/workflow"
"github.com/Azure/Orkestra/pkg/registry"
"k8s.io/apimachinery/pkg/runtime"
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/log/zap"
orkestrav1alpha1 "github.com/Azure/Orkestra/api/v1alpha1"
"github.com/Azure/Orkestra/controllers"
v1alpha13 "github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1"
fluxhelmv2beta1 "github.com/fluxcd/helm-controller/api/v2beta1"
// +kubebuilder:scaffold:imports
)
Merge dev branch into main (#36) * feat: Initialise application controller with chart pull & push functionality (#16) * feat: init application reconciler Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * use controller-gen 0.2.9 Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * fix:ci Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: introduct groupName Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add groupID Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add fetch function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add fetch function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * add test for AB#13 Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * initiate push logic Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: complete push function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: add configuration Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * fix: golangcilint and tests Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: change branch name pattern to dev (#23) * retrigger pipeline Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * Nitishm/feature/ab#15/appgroup reconciler scaffold (#25) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Scaffolding for application group reconciler Created the reconciler method for ApplicationGroup controller Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Added reconciler lookup functionality Base functionality of application reconciler. Still needs the generation functions for Argo Workflow object. Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Workflow interface and appgroup reconciler features Added a bunch of changes to this commit: - Created a Workflow engine interface to support any type of workflow engine - Added logic to appgroup_reconciler. Mostly WIP but sets the skeleton for the upcoming commits. Fixes ab#21 Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> feat: AppGroup reconciler update TODO: - Generate the HelmRelease object - Set the executor template Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> feat: ApplicationGroup first pass dev complete - Needs more unit tests - Not yet fit for usage Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Added unit tests (incomplete WIP) WIP UTs for ApplicationGroup functions: Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix go.mod errors (#26) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Application and ApplicationReconciler and supported packages into dev branch (#28) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Nitishm/feat/chart/push (#31) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Fixed lint errors and test failures (#33) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * chore: Update docker targets in Make and comment cleanup (#34) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Docker target changes and TODO comment cleanup Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * [chore] Helm chart for orkestra and relevant changes (#35) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Docker target changes and TODO comment cleanup Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Helm chart for orkestra and related changes - Created the helm chart for orkestra - Made relevant changes based on feedback from running it on the cluster Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Create example dir and edits to README.md Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update example and set ownersreference for helmrelease Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix argo tests failures from previous set of changes Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint error in argo test Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com>
2021-02-03 05:49:42 +03:00
const (
stagingRepoURLEnv = "STAGING_REPO_URL"
Merge dev branch into main (#36) * feat: Initialise application controller with chart pull & push functionality (#16) * feat: init application reconciler Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * use controller-gen 0.2.9 Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * fix:ci Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: introduct groupName Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add groupID Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add fetch function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add fetch function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * add test for AB#13 Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * initiate push logic Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: complete push function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: add configuration Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * fix: golangcilint and tests Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: change branch name pattern to dev (#23) * retrigger pipeline Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * Nitishm/feature/ab#15/appgroup reconciler scaffold (#25) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Scaffolding for application group reconciler Created the reconciler method for ApplicationGroup controller Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Added reconciler lookup functionality Base functionality of application reconciler. Still needs the generation functions for Argo Workflow object. Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Workflow interface and appgroup reconciler features Added a bunch of changes to this commit: - Created a Workflow engine interface to support any type of workflow engine - Added logic to appgroup_reconciler. Mostly WIP but sets the skeleton for the upcoming commits. Fixes ab#21 Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> feat: AppGroup reconciler update TODO: - Generate the HelmRelease object - Set the executor template Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> feat: ApplicationGroup first pass dev complete - Needs more unit tests - Not yet fit for usage Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Added unit tests (incomplete WIP) WIP UTs for ApplicationGroup functions: Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix go.mod errors (#26) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Application and ApplicationReconciler and supported packages into dev branch (#28) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Nitishm/feat/chart/push (#31) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Fixed lint errors and test failures (#33) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * chore: Update docker targets in Make and comment cleanup (#34) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Docker target changes and TODO comment cleanup Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * [chore] Helm chart for orkestra and relevant changes (#35) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Docker target changes and TODO comment cleanup Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Helm chart for orkestra and related changes - Created the helm chart for orkestra - Made relevant changes based on feedback from running it on the cluster Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Create example dir and edits to README.md Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update example and set ownersreference for helmrelease Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix argo tests failures from previous set of changes Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint error in argo test Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com>
2021-02-03 05:49:42 +03:00
)
var (
scheme = runtime.NewScheme()
setupLog = ctrl.Log.WithName("setup")
)
func init() {
_ = clientgoscheme.AddToScheme(scheme)
_ = orkestrav1alpha1.AddToScheme(scheme)
// +kubebuilder:scaffold:scheme
Merge dev branch into main (#36) * feat: Initialise application controller with chart pull & push functionality (#16) * feat: init application reconciler Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * use controller-gen 0.2.9 Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * fix:ci Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: introduct groupName Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add groupID Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add fetch function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add fetch function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * add test for AB#13 Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * initiate push logic Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: complete push function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: add configuration Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * fix: golangcilint and tests Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: change branch name pattern to dev (#23) * retrigger pipeline Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * Nitishm/feature/ab#15/appgroup reconciler scaffold (#25) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Scaffolding for application group reconciler Created the reconciler method for ApplicationGroup controller Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Added reconciler lookup functionality Base functionality of application reconciler. Still needs the generation functions for Argo Workflow object. Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Workflow interface and appgroup reconciler features Added a bunch of changes to this commit: - Created a Workflow engine interface to support any type of workflow engine - Added logic to appgroup_reconciler. Mostly WIP but sets the skeleton for the upcoming commits. Fixes ab#21 Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> feat: AppGroup reconciler update TODO: - Generate the HelmRelease object - Set the executor template Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> feat: ApplicationGroup first pass dev complete - Needs more unit tests - Not yet fit for usage Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Added unit tests (incomplete WIP) WIP UTs for ApplicationGroup functions: Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix go.mod errors (#26) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Application and ApplicationReconciler and supported packages into dev branch (#28) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Nitishm/feat/chart/push (#31) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Fixed lint errors and test failures (#33) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * chore: Update docker targets in Make and comment cleanup (#34) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Docker target changes and TODO comment cleanup Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * [chore] Helm chart for orkestra and relevant changes (#35) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Docker target changes and TODO comment cleanup Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Helm chart for orkestra and related changes - Created the helm chart for orkestra - Made relevant changes based on feedback from running it on the cluster Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Create example dir and edits to README.md Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update example and set ownersreference for helmrelease Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix argo tests failures from previous set of changes Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint error in argo test Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com>
2021-02-03 05:49:42 +03:00
// Add Argo Workflow scheme to operator
_ = v1alpha13.AddToScheme(scheme)
Merge dev branch into main (#36) * feat: Initialise application controller with chart pull & push functionality (#16) * feat: init application reconciler Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * use controller-gen 0.2.9 Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * fix:ci Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: introduct groupName Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add groupID Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add fetch function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add fetch function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * add test for AB#13 Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * initiate push logic Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: complete push function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: add configuration Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * fix: golangcilint and tests Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: change branch name pattern to dev (#23) * retrigger pipeline Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * Nitishm/feature/ab#15/appgroup reconciler scaffold (#25) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Scaffolding for application group reconciler Created the reconciler method for ApplicationGroup controller Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Added reconciler lookup functionality Base functionality of application reconciler. Still needs the generation functions for Argo Workflow object. Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Workflow interface and appgroup reconciler features Added a bunch of changes to this commit: - Created a Workflow engine interface to support any type of workflow engine - Added logic to appgroup_reconciler. Mostly WIP but sets the skeleton for the upcoming commits. Fixes ab#21 Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> feat: AppGroup reconciler update TODO: - Generate the HelmRelease object - Set the executor template Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> feat: ApplicationGroup first pass dev complete - Needs more unit tests - Not yet fit for usage Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Added unit tests (incomplete WIP) WIP UTs for ApplicationGroup functions: Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix go.mod errors (#26) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Application and ApplicationReconciler and supported packages into dev branch (#28) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Nitishm/feat/chart/push (#31) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Fixed lint errors and test failures (#33) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * chore: Update docker targets in Make and comment cleanup (#34) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Docker target changes and TODO comment cleanup Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * [chore] Helm chart for orkestra and relevant changes (#35) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Docker target changes and TODO comment cleanup Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Helm chart for orkestra and related changes - Created the helm chart for orkestra - Made relevant changes based on feedback from running it on the cluster Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Create example dir and edits to README.md Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update example and set ownersreference for helmrelease Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix argo tests failures from previous set of changes Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint error in argo test Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com>
2021-02-03 05:49:42 +03:00
// Add HelmRelease scheme to operator
_ = fluxhelmv2beta1.AddToScheme(scheme)
}
func main() {
2021-08-05 07:40:09 +03:00
var (
metricsAddr string
enableLeaderElection bool
configPath string
stagingRepoURL string
tempChartStoreTargetDir string
disableRemediation bool
cleanupDownloadedCharts bool
debug bool
workflowParallelism int64
logLevel int
enableZapLogDevMode bool
)
Merge dev branch into main (#36) * feat: Initialise application controller with chart pull & push functionality (#16) * feat: init application reconciler Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * use controller-gen 0.2.9 Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * fix:ci Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: introduct groupName Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add groupID Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add fetch function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add fetch function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * add test for AB#13 Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * initiate push logic Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: complete push function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: add configuration Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * fix: golangcilint and tests Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: change branch name pattern to dev (#23) * retrigger pipeline Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * Nitishm/feature/ab#15/appgroup reconciler scaffold (#25) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Scaffolding for application group reconciler Created the reconciler method for ApplicationGroup controller Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Added reconciler lookup functionality Base functionality of application reconciler. Still needs the generation functions for Argo Workflow object. Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Workflow interface and appgroup reconciler features Added a bunch of changes to this commit: - Created a Workflow engine interface to support any type of workflow engine - Added logic to appgroup_reconciler. Mostly WIP but sets the skeleton for the upcoming commits. Fixes ab#21 Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> feat: AppGroup reconciler update TODO: - Generate the HelmRelease object - Set the executor template Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> feat: ApplicationGroup first pass dev complete - Needs more unit tests - Not yet fit for usage Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Added unit tests (incomplete WIP) WIP UTs for ApplicationGroup functions: Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix go.mod errors (#26) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Application and ApplicationReconciler and supported packages into dev branch (#28) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Nitishm/feat/chart/push (#31) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Fixed lint errors and test failures (#33) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * chore: Update docker targets in Make and comment cleanup (#34) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Docker target changes and TODO comment cleanup Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * [chore] Helm chart for orkestra and relevant changes (#35) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Docker target changes and TODO comment cleanup Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Helm chart for orkestra and related changes - Created the helm chart for orkestra - Made relevant changes based on feedback from running it on the cluster Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Create example dir and edits to README.md Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update example and set ownersreference for helmrelease Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix argo tests failures from previous set of changes Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint error in argo test Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com>
2021-02-03 05:49:42 +03:00
flag.StringVar(&metricsAddr, "metrics-addr", ":8081", "The address the metric endpoint binds to.")
flag.BoolVar(&enableLeaderElection, "enable-leader-election", false,
"Enable leader election for controller manager. "+
"Enabling this will ensure there is only one active controller manager.")
Merge dev branch into main (#36) * feat: Initialise application controller with chart pull & push functionality (#16) * feat: init application reconciler Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * use controller-gen 0.2.9 Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * fix:ci Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: introduct groupName Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add groupID Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add fetch function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add fetch function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * add test for AB#13 Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * initiate push logic Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: complete push function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: add configuration Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * fix: golangcilint and tests Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: change branch name pattern to dev (#23) * retrigger pipeline Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * Nitishm/feature/ab#15/appgroup reconciler scaffold (#25) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Scaffolding for application group reconciler Created the reconciler method for ApplicationGroup controller Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Added reconciler lookup functionality Base functionality of application reconciler. Still needs the generation functions for Argo Workflow object. Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Workflow interface and appgroup reconciler features Added a bunch of changes to this commit: - Created a Workflow engine interface to support any type of workflow engine - Added logic to appgroup_reconciler. Mostly WIP but sets the skeleton for the upcoming commits. Fixes ab#21 Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> feat: AppGroup reconciler update TODO: - Generate the HelmRelease object - Set the executor template Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> feat: ApplicationGroup first pass dev complete - Needs more unit tests - Not yet fit for usage Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Added unit tests (incomplete WIP) WIP UTs for ApplicationGroup functions: Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix go.mod errors (#26) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Application and ApplicationReconciler and supported packages into dev branch (#28) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Nitishm/feat/chart/push (#31) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Fixed lint errors and test failures (#33) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * chore: Update docker targets in Make and comment cleanup (#34) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Docker target changes and TODO comment cleanup Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * [chore] Helm chart for orkestra and relevant changes (#35) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Docker target changes and TODO comment cleanup Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Helm chart for orkestra and related changes - Created the helm chart for orkestra - Made relevant changes based on feedback from running it on the cluster Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Create example dir and edits to README.md Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update example and set ownersreference for helmrelease Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix argo tests failures from previous set of changes Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint error in argo test Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com>
2021-02-03 05:49:42 +03:00
flag.StringVar(&configPath, "config", "", "The path to the controller config file")
flag.StringVar(&stagingRepoURL, "staging-repo-url", "", "The URL for the helm registry used for staging artifacts (ENV - STAGING_REPO_URL). NOTE: Flag overrides env value")
Merge dev branch into main (#36) * feat: Initialise application controller with chart pull & push functionality (#16) * feat: init application reconciler Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * use controller-gen 0.2.9 Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * fix:ci Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: introduct groupName Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add groupID Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add fetch function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add fetch function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * add test for AB#13 Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * initiate push logic Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: complete push function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: add configuration Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * fix: golangcilint and tests Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: change branch name pattern to dev (#23) * retrigger pipeline Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * Nitishm/feature/ab#15/appgroup reconciler scaffold (#25) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Scaffolding for application group reconciler Created the reconciler method for ApplicationGroup controller Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Added reconciler lookup functionality Base functionality of application reconciler. Still needs the generation functions for Argo Workflow object. Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Workflow interface and appgroup reconciler features Added a bunch of changes to this commit: - Created a Workflow engine interface to support any type of workflow engine - Added logic to appgroup_reconciler. Mostly WIP but sets the skeleton for the upcoming commits. Fixes ab#21 Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> feat: AppGroup reconciler update TODO: - Generate the HelmRelease object - Set the executor template Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> feat: ApplicationGroup first pass dev complete - Needs more unit tests - Not yet fit for usage Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Added unit tests (incomplete WIP) WIP UTs for ApplicationGroup functions: Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix go.mod errors (#26) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Application and ApplicationReconciler and supported packages into dev branch (#28) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Nitishm/feat/chart/push (#31) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Fixed lint errors and test failures (#33) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * chore: Update docker targets in Make and comment cleanup (#34) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Docker target changes and TODO comment cleanup Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * [chore] Helm chart for orkestra and relevant changes (#35) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Docker target changes and TODO comment cleanup Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Helm chart for orkestra and related changes - Created the helm chart for orkestra - Made relevant changes based on feedback from running it on the cluster Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Create example dir and edits to README.md Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update example and set ownersreference for helmrelease Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix argo tests failures from previous set of changes Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint error in argo test Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com>
2021-02-03 05:49:42 +03:00
flag.StringVar(&tempChartStoreTargetDir, "chart-store-path", "", "The temporary storage path for the downloaded and staged chart artifacts")
flag.BoolVar(&disableRemediation, "disable-remediation", false, "Disable the remediation (delete/rollback) of the workflow on failure (useful if you wish to debug failures in the workflow/executor container")
flag.BoolVar(&cleanupDownloadedCharts, "cleanup-downloaded-charts", false, "Enable/disable the cleanup of the charts downloaded to the chart-store-path")
flag.BoolVar(&debug, "debug", false, "Enable debug run of the appgroup controller")
flag.Int64Var(&workflowParallelism, "workflow-parallelism", 10, "Specifies the max number of workflow pods that can be executed in parallel")
flag.IntVar(&logLevel, "log-level", 0, "Log Level")
flag.Parse()
2021-08-05 07:40:09 +03:00
if logLevel < 0 {
enableZapLogDevMode = true
}
2021-08-05 07:40:09 +03:00
ctrl.SetLogger(zap.New(zap.UseDevMode(enableZapLogDevMode)))
// Start the probe at the very beginning
probe, err := utils.ProbeHandler(stagingRepoURL, "health")
if err != nil {
setupLog.Error(err, "unable to start readiness/liveness probes", "controller", "ApplicationGroup")
os.Exit(1)
}
probe.Start("8086")
ctrl.Log.V(logLevel)
mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
Scheme: scheme,
MetricsBindAddress: metricsAddr,
Port: 9443,
LeaderElection: enableLeaderElection,
LeaderElectionID: "fdcf4a0d.azure.microsoft.com",
})
if err != nil {
setupLog.Error(err, "unable to start manager")
os.Exit(1)
}
// Grabbing the values based on the passed helm flags, these values change if we run in debug mode
stagingHelmURL, workflowHelmURL, tempChartStoreTargetDir := getValues(stagingRepoURL, tempChartStoreTargetDir, debug)
if stagingHelmURL == "" {
2021-08-05 07:40:09 +03:00
s := os.Getenv(stagingRepoURLEnv)
if s == "" {
Merge dev branch into main (#36) * feat: Initialise application controller with chart pull & push functionality (#16) * feat: init application reconciler Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * use controller-gen 0.2.9 Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * fix:ci Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: introduct groupName Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add groupID Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add fetch function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add fetch function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * add test for AB#13 Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * initiate push logic Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: complete push function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: add configuration Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * fix: golangcilint and tests Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: change branch name pattern to dev (#23) * retrigger pipeline Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * Nitishm/feature/ab#15/appgroup reconciler scaffold (#25) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Scaffolding for application group reconciler Created the reconciler method for ApplicationGroup controller Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Added reconciler lookup functionality Base functionality of application reconciler. Still needs the generation functions for Argo Workflow object. Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Workflow interface and appgroup reconciler features Added a bunch of changes to this commit: - Created a Workflow engine interface to support any type of workflow engine - Added logic to appgroup_reconciler. Mostly WIP but sets the skeleton for the upcoming commits. Fixes ab#21 Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> feat: AppGroup reconciler update TODO: - Generate the HelmRelease object - Set the executor template Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> feat: ApplicationGroup first pass dev complete - Needs more unit tests - Not yet fit for usage Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Added unit tests (incomplete WIP) WIP UTs for ApplicationGroup functions: Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix go.mod errors (#26) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Application and ApplicationReconciler and supported packages into dev branch (#28) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Nitishm/feat/chart/push (#31) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Fixed lint errors and test failures (#33) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * chore: Update docker targets in Make and comment cleanup (#34) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Docker target changes and TODO comment cleanup Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * [chore] Helm chart for orkestra and relevant changes (#35) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Docker target changes and TODO comment cleanup Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Helm chart for orkestra and related changes - Created the helm chart for orkestra - Made relevant changes based on feedback from running it on the cluster Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Create example dir and edits to README.md Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update example and set ownersreference for helmrelease Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix argo tests failures from previous set of changes Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint error in argo test Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com>
2021-02-03 05:49:42 +03:00
setupLog.Error(err, "staging repo URL must be set")
os.Exit(1)
}
2021-08-05 07:40:09 +03:00
stagingHelmURL = s
Merge dev branch into main (#36) * feat: Initialise application controller with chart pull & push functionality (#16) * feat: init application reconciler Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * use controller-gen 0.2.9 Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * fix:ci Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: introduct groupName Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add groupID Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add fetch function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add fetch function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * add test for AB#13 Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * initiate push logic Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: complete push function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: add configuration Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * fix: golangcilint and tests Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: change branch name pattern to dev (#23) * retrigger pipeline Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * Nitishm/feature/ab#15/appgroup reconciler scaffold (#25) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Scaffolding for application group reconciler Created the reconciler method for ApplicationGroup controller Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Added reconciler lookup functionality Base functionality of application reconciler. Still needs the generation functions for Argo Workflow object. Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Workflow interface and appgroup reconciler features Added a bunch of changes to this commit: - Created a Workflow engine interface to support any type of workflow engine - Added logic to appgroup_reconciler. Mostly WIP but sets the skeleton for the upcoming commits. Fixes ab#21 Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> feat: AppGroup reconciler update TODO: - Generate the HelmRelease object - Set the executor template Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> feat: ApplicationGroup first pass dev complete - Needs more unit tests - Not yet fit for usage Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Added unit tests (incomplete WIP) WIP UTs for ApplicationGroup functions: Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix go.mod errors (#26) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Application and ApplicationReconciler and supported packages into dev branch (#28) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Nitishm/feat/chart/push (#31) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Fixed lint errors and test failures (#33) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * chore: Update docker targets in Make and comment cleanup (#34) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Docker target changes and TODO comment cleanup Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * [chore] Helm chart for orkestra and relevant changes (#35) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Docker target changes and TODO comment cleanup Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Helm chart for orkestra and related changes - Created the helm chart for orkestra - Made relevant changes based on feedback from running it on the cluster Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Create example dir and edits to README.md Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update example and set ownersreference for helmrelease Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix argo tests failures from previous set of changes Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint error in argo test Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com>
2021-02-03 05:49:42 +03:00
}
rc, err := registry.NewClient(
ctrl.Log,
Merge dev branch into main (#36) * feat: Initialise application controller with chart pull & push functionality (#16) * feat: init application reconciler Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * use controller-gen 0.2.9 Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * fix:ci Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: introduct groupName Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add groupID Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add fetch function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add fetch function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * add test for AB#13 Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * initiate push logic Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: complete push function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: add configuration Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * fix: golangcilint and tests Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: change branch name pattern to dev (#23) * retrigger pipeline Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * Nitishm/feature/ab#15/appgroup reconciler scaffold (#25) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Scaffolding for application group reconciler Created the reconciler method for ApplicationGroup controller Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Added reconciler lookup functionality Base functionality of application reconciler. Still needs the generation functions for Argo Workflow object. Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Workflow interface and appgroup reconciler features Added a bunch of changes to this commit: - Created a Workflow engine interface to support any type of workflow engine - Added logic to appgroup_reconciler. Mostly WIP but sets the skeleton for the upcoming commits. Fixes ab#21 Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> feat: AppGroup reconciler update TODO: - Generate the HelmRelease object - Set the executor template Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> feat: ApplicationGroup first pass dev complete - Needs more unit tests - Not yet fit for usage Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Added unit tests (incomplete WIP) WIP UTs for ApplicationGroup functions: Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix go.mod errors (#26) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Application and ApplicationReconciler and supported packages into dev branch (#28) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Nitishm/feat/chart/push (#31) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Fixed lint errors and test failures (#33) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * chore: Update docker targets in Make and comment cleanup (#34) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Docker target changes and TODO comment cleanup Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * [chore] Helm chart for orkestra and relevant changes (#35) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Docker target changes and TODO comment cleanup Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Helm chart for orkestra and related changes - Created the helm chart for orkestra - Made relevant changes based on feedback from running it on the cluster Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Create example dir and edits to README.md Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update example and set ownersreference for helmrelease Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix argo tests failures from previous set of changes Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint error in argo test Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com>
2021-02-03 05:49:42 +03:00
registry.TargetDir(tempChartStoreTargetDir),
)
if err != nil {
setupLog.Error(err, "unable to create new registry client", "controller", "registry-client")
os.Exit(1)
}
// Register the staging helm repository/registry
// We perform retry on this so that we don't go into a crash loop backoff
retryChan := make(chan bool)
retryCtx, cancel := context.WithTimeout(context.Background(), time.Minute*5)
go func() {
for {
err = rc.AddRepo(&registry.Config{
Name: "staging",
URL: stagingHelmURL,
})
if err != nil {
2021-08-05 07:40:09 +03:00
setupLog.Error(err, "failed to add staging helm repo, retrying...")
time.Sleep(time.Second * 5)
} else {
retryChan <- true
break
}
}
}()
select {
case <-retryChan:
cancel()
close(retryChan)
setupLog.Info("successfully set-up the local chartmuseum helm repository")
case <-retryCtx.Done():
cancel()
close(retryChan)
setupLog.Error(err, "pod timed out while trying to setup the helm chart museum...")
Merge dev branch into main (#36) * feat: Initialise application controller with chart pull & push functionality (#16) * feat: init application reconciler Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * use controller-gen 0.2.9 Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * fix:ci Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: introduct groupName Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add groupID Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add fetch function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * feat: add fetch function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * add test for AB#13 Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * initiate push logic Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: complete push function Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: add configuration Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * fix: golangcilint and tests Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * chore: change branch name pattern to dev (#23) * retrigger pipeline Signed-off-by: Kush Trivedi <kushthedude@gmail.com> * Nitishm/feature/ab#15/appgroup reconciler scaffold (#25) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Scaffolding for application group reconciler Created the reconciler method for ApplicationGroup controller Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Added reconciler lookup functionality Base functionality of application reconciler. Still needs the generation functions for Argo Workflow object. Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Workflow interface and appgroup reconciler features Added a bunch of changes to this commit: - Created a Workflow engine interface to support any type of workflow engine - Added logic to appgroup_reconciler. Mostly WIP but sets the skeleton for the upcoming commits. Fixes ab#21 Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> feat: AppGroup reconciler update TODO: - Generate the HelmRelease object - Set the executor template Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> feat: ApplicationGroup first pass dev complete - Needs more unit tests - Not yet fit for usage Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Added unit tests (incomplete WIP) WIP UTs for ApplicationGroup functions: Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix go.mod errors (#26) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Application and ApplicationReconciler and supported packages into dev branch (#28) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Nitishm/feat/chart/push (#31) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * Fixed lint errors and test failures (#33) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * chore: Update docker targets in Make and comment cleanup (#34) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Docker target changes and TODO comment cleanup Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> * [chore] Helm chart for orkestra and relevant changes (#35) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * chore: change branch name pattern to dev (#23) * Fix go.mod dependencies go.mod was failing to resolve dependencies Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Add additional tests for Argo.go functions Added more test and test cases Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Updated status field for application type Made Chartstatus inline so that we reference it under obj.status instead of obj.status.status which causes stutter Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Created registry Client and related methods - Modifications to rest of the code tree to support registry client Still a WIP Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * New configurer and additional controller members Added new members to Application and ApplicationGroup controller objects Refactored the controller Config struct Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Restructuring w/ major changes Bunch of changes to the controller and reconciler Updated configurer and config.yaml format Changes to application and applicationgroup CRD Status fields Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update orkestra-core illustration (#30) * Add PUML sequence diagrams Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Setup azure-pipeline for Go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update diagram and switch harbor for chartmuseum Update the orkestra-core diagram replacing harbor for chartmuseum Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Implemented the Push functionlity Verfied manually that charts get uploaded to the staging directory Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * bug: resolve merge errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * feat: Modifications and enhanced argo logic - Multiple changes in argo object to support generation of valid workflow - Added overlays field to Applications CR as a workaround for https://github.com/kubernetes/kubernetes/issues/98683 - Helm chart for orkestra init. All dependency charts helm-operator, chartmuseum, argo added to chart dependencies. - Update main.go Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint and argo_test errors Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Docker target changes and TODO comment cleanup Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Helm chart for orkestra and related changes - Created the helm chart for orkestra - Made relevant changes based on feedback from running it on the cluster Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Create example dir and edits to README.md Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Update example and set ownersreference for helmrelease Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix argo tests failures from previous set of changes Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> * Fix lint error in argo test Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com>
2021-02-03 05:49:42 +03:00
os.Exit(1)
}
baseLogger := ctrl.Log.WithName("controllers").WithName("ApplicationGroup")
if err = (&controllers.ApplicationGroupReconciler{
Client: mgr.GetClient(),
Log: baseLogger,
Scheme: mgr.GetScheme(),
RegistryClient: rc,
StagingRepoName: "staging",
WorkflowClientBuilder: workflow.NewBuilder(mgr.GetClient(), baseLogger).WithStagingRepo(workflowHelmURL).WithParallelism(workflowParallelism).InNamespace(workflow.GetNamespace()),
TargetDir: tempChartStoreTargetDir,
Recorder: mgr.GetEventRecorderFor("appgroup-controller"),
DisableRemediation: disableRemediation,
CleanupDownloadedCharts: cleanupDownloadedCharts,
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "ApplicationGroup")
os.Exit(1)
}
if err = (&controllers.WorkflowStatusReconciler{
Client: mgr.GetClient(),
Log: baseLogger,
Scheme: mgr.GetScheme(),
WorkflowClientBuilder: workflow.NewBuilder(mgr.GetClient(), baseLogger).WithStagingRepo(workflowHelmURL).WithParallelism(workflowParallelism).InNamespace(workflow.GetNamespace()),
Recorder: mgr.GetEventRecorderFor("appgroup-controller"),
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "WorkflowStatus")
os.Exit(1)
}
// +kubebuilder:scaffold:builder
setupLog.Info("starting manager")
if err := mgr.Start(ctrl.SetupSignalHandler()); err != nil {
setupLog.Error(err, "problem running manager")
os.Exit(1)
}
}
// getValues returns the stagingRepoUrl unless the appGroup controller
// is run in a debug mode, then it returns the port forwarded url
func getValues(stagingHelmURL, tempChartStoreTargetDir string, debug bool) (string, string, string) {
if debug {
return "http://127.0.0.1:8080", "http://orkestra-chartmuseum.orkestra:8080", os.TempDir()
}
return stagingHelmURL, stagingHelmURL, tempChartStoreTargetDir
}