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

Commit

Permalink
completed merge from previous PRs
Browse files Browse the repository at this point in the history
completed tests
  • Loading branch information
raffaelespazzoli committed Jul 17, 2019
1 parent 0668f96 commit f086e87
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ To check out this repository:
1. Create a [fork](https://help.github.com/en/articles/fork-a-repo) of this repo
2. Create the directories and clone your fork

```
```shell
mkdir -p $GOPATH/src/github.com/KohlsTechnology
cd $GOPATH/src/github.com/KohlsTechnology
git clone https://github.com/<YOUR FORK>/eunomia.git
Expand All @@ -43,7 +43,7 @@ brew install minishift

The most efficient way to develop the operator locally is run the code on your local machine. This allows you to test code changes as you make them.

```
```shell
minikube start
kubectl apply -f ./deploy/crds/eunomia_v1alpha1_gitopsconfig_crd.yaml
export JOB_TEMPLATE=./templates/job.yaml
Expand All @@ -61,7 +61,7 @@ The Eunomia operator gets packaged as a container image for running on Kubernete

### Building the image on your local workstation

See https://golang.org/doc/install to install/setup your Go Programming environment if you have not already done this.
See [golang install instracutions](https://golang.org/doc/install) to install/setup your Go Programming environment if you have not already done this.

```shell
export GO111MODULE=on
Expand Down
4 changes: 3 additions & 1 deletion pkg/controller/gitopsconfig/gitopsconfig_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
}

// Watch for changes to primary resource GitOpsConfig
err = c.Watch(&source.Kind{Type: &gitopsv1alpha1.GitOpsConfig{}}, &handler.EnqueueRequestForObject{})
err = c.Watch(&source.Kind{Type: &gitopsv1alpha1.GitOpsConfig{}}, &handler.EnqueueRequestForObject{}, opsutil.ResourceGenerationOrFinalizerChangedPredicate{})
if err != nil {
return err
}
Expand Down Expand Up @@ -322,6 +322,7 @@ func (r *ReconcileGitOpsConfig) manageDeletion(instance *gitopsv1alpha1.GitOpsCo
return reconcile.Result{}, nil
}

// IsValid returns true if the obj is balid and false with an error describing the nature of the violation if not.
func (r *ReconcileGitOpsConfig) IsValid(obj metav1.Object) (bool, error) {
instance, ok := obj.(*gitopsv1alpha1.GitOpsConfig)
if !ok {
Expand All @@ -334,6 +335,7 @@ func (r *ReconcileGitOpsConfig) IsValid(obj metav1.Object) (bool, error) {
return true, nil
}

// IsInitialized determines whether obj is initialzied. if ont it returns false and obj will be changed with initilzied values, so that it can be used to update the instance.
func (r *ReconcileGitOpsConfig) IsInitialized(obj metav1.Object) bool {
instance, ok := obj.(*gitopsv1alpha1.GitOpsConfig)
if !ok {
Expand Down

0 comments on commit f086e87

Please sign in to comment.