Skip to content
This repository has been archived by the owner on Mar 11, 2022. It is now read-only.

Commit

Permalink
finished integration
Browse files Browse the repository at this point in the history
  • Loading branch information
raffaelespazzoli committed Jul 17, 2019
1 parent ab12568 commit 0668f96
Show file tree
Hide file tree
Showing 8 changed files with 109 additions and 151 deletions.
3 changes: 1 addition & 2 deletions cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import (
"github.com/KohlsTechnology/eunomia/pkg/controller"
"github.com/KohlsTechnology/eunomia/pkg/controller/gitopsconfig"
"github.com/KohlsTechnology/eunomia/pkg/handler"
"github.com/KohlsTechnology/eunomia/pkg/util"

"github.com/operator-framework/operator-sdk/pkg/k8sutil"
"github.com/operator-framework/operator-sdk/pkg/leader"
Expand Down Expand Up @@ -95,7 +94,7 @@ func main() {
log.Info("Error: CRONJOB_TEMPLATE must be set")
os.Exit(1)
}
util.InitializeTemplates(jt, cjt)
gitopsconfig.InitializeTemplates(jt, cjt)
log.Info("Templates initialized correctly")

// Get a config to talk to the apiserver
Expand Down
11 changes: 11 additions & 0 deletions deploy/crds/eunomia_v1alpha1_gitopsconfig_crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,17 @@ spec:
type: array
type: object
status:
properties:
lastUpdate:
format: date-time
type: string
reason:
type: string
status:
enum:
- Success
- Failure
type: string
type: object
version: v1alpha1
versions:
Expand Down
10 changes: 10 additions & 0 deletions pkg/apis/eunomia/v1alpha1/gitopsconfig_types.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package v1alpha1

import (
"github.com/redhat-cop/operator-utils/pkg/util/apis"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

Expand Down Expand Up @@ -62,6 +63,15 @@ type GitOpsConfigStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file
// Add custom validation using kubebuilder tags: https://book.kubebuilder.io/beyond_basics/generating_crd.html
apis.ReconcileStatus `json:",inline"`
}

func (m *GitOpsConfig) GetReconcileStatus() apis.ReconcileStatus {
return m.Status.ReconcileStatus
}

func (m *GitOpsConfig) SetReconcileStatus(reconcileStatus apis.ReconcileStatus) {
m.Status.ReconcileStatus = reconcileStatus
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
Expand Down
3 changes: 2 additions & 1 deletion pkg/apis/eunomia/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 21 additions & 2 deletions pkg/apis/eunomia/v1alpha1/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0668f96

Please sign in to comment.