Commit ec68d991 authored by Vineet Reddy Rajula's avatar Vineet Reddy Rajula Committed by Konstantinos Samaras-Tsakiris
Browse files

deploymentCongis -> deployments, createOrUpdate function

parent 3040baa2
...@@ -7,9 +7,9 @@ metadata: ...@@ -7,9 +7,9 @@ metadata:
name: manager-role name: manager-role
rules: rules:
- apiGroups: - apiGroups:
- apps.openshift.io - app
resources: resources:
- deploymentconfigs - deployments
verbs: verbs:
- '*' - '*'
- apiGroups: - apiGroups:
......
...@@ -21,12 +21,12 @@ import ( ...@@ -21,12 +21,12 @@ import (
"fmt" "fmt"
"github.com/go-logr/logr" "github.com/go-logr/logr"
appsv1 "github.com/openshift/api/apps/v1"
buildv1 "github.com/openshift/api/build/v1" buildv1 "github.com/openshift/api/build/v1"
imagev1 "github.com/openshift/api/image/v1" imagev1 "github.com/openshift/api/image/v1"
routev1 "github.com/openshift/api/route/v1" routev1 "github.com/openshift/api/route/v1"
"github.com/operator-framework/operator-lib/status" "github.com/operator-framework/operator-lib/status"
webservicesv1a1 "gitlab.cern.ch/drupal/paas/drupalsite-operator/api/v1alpha1" webservicesv1a1 "gitlab.cern.ch/drupal/paas/drupalsite-operator/api/v1alpha1"
appsv1 "k8s.io/api/apps/v1"
batchv1 "k8s.io/api/batch/v1" batchv1 "k8s.io/api/batch/v1"
corev1 "k8s.io/api/core/v1" corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/errors"
...@@ -47,8 +47,7 @@ type DrupalSiteReconciler struct { ...@@ -47,8 +47,7 @@ type DrupalSiteReconciler struct {
// +kubebuilder:rbac:groups=drupal.webservices.cern.ch,resources=drupalsites,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=drupal.webservices.cern.ch,resources=drupalsites,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=drupal.webservices.cern.ch,resources=drupalsites/status,verbs=get;update;patch // +kubebuilder:rbac:groups=drupal.webservices.cern.ch,resources=drupalsites/status,verbs=get;update;patch
// +kubebuilder:rbac:groups=drupal.webservices.cern.ch,resources=drupalsites/finalizers,verbs=update // +kubebuilder:rbac:groups=drupal.webservices.cern.ch,resources=drupalsites/finalizers,verbs=update
// +kubebuilder:rbac:groups=app,resources=deployments,verbs=*
// +kubebuilder:rbac:groups=apps.openshift.io,resources=deploymentconfigs,verbs=*
// +kubebuilder:rbac:groups=build.openshift.io,resources=buildconfig,verbs=* // +kubebuilder:rbac:groups=build.openshift.io,resources=buildconfig,verbs=*
// +kubebuilder:rbac:groups=image.openshift.io,resources=imagestream,verbs=* // +kubebuilder:rbac:groups=image.openshift.io,resources=imagestream,verbs=*
// +kubebuilder:rbac:groups=route.openshift.io,resources=routes,verbs=* // +kubebuilder:rbac:groups=route.openshift.io,resources=routes,verbs=*
...@@ -60,7 +59,7 @@ type DrupalSiteReconciler struct { ...@@ -60,7 +59,7 @@ type DrupalSiteReconciler struct {
func (r *DrupalSiteReconciler) SetupWithManager(mgr ctrl.Manager) error { func (r *DrupalSiteReconciler) SetupWithManager(mgr ctrl.Manager) error {
return ctrl.NewControllerManagedBy(mgr). return ctrl.NewControllerManagedBy(mgr).
For(&webservicesv1a1.DrupalSite{}). For(&webservicesv1a1.DrupalSite{}).
Owns(&appsv1.DeploymentConfig{}). Owns(&appsv1.Deployment{}).
Owns(&buildv1.BuildConfig{}). Owns(&buildv1.BuildConfig{}).
Owns(&imagev1.ImageStream{}). Owns(&imagev1.ImageStream{}).
Owns(&routev1.Route{}). Owns(&routev1.Route{}).
......
This diff is collapsed.
...@@ -14,6 +14,7 @@ var ( ...@@ -14,6 +14,7 @@ var (
// Consider constraining the arg type. // Consider constraining the arg type.
ErrFunctionDomain = errors.New("FunctionDomainError") ErrFunctionDomain = errors.New("FunctionDomainError")
ErrClientK8s = errors.New("k8sAPIClientError") ErrClientK8s = errors.New("k8sAPIClientError")
ErrFilesystemIO = errors.New("FilesystemIOError")
) )
type reconcileError interface { type reconcileError interface {
......
...@@ -41,10 +41,10 @@ import ( ...@@ -41,10 +41,10 @@ import (
"gitlab.cern.ch/drupal/paas/drupalsite-operator/controllers" "gitlab.cern.ch/drupal/paas/drupalsite-operator/controllers"
// +kubebuilder:scaffold:imports // +kubebuilder:scaffold:imports
appsv1 "github.com/openshift/api/apps/v1"
buildv1 "github.com/openshift/api/build/v1" buildv1 "github.com/openshift/api/build/v1"
imagev1 "github.com/openshift/api/image/v1" imagev1 "github.com/openshift/api/image/v1"
routev1 "github.com/openshift/api/route/v1" routev1 "github.com/openshift/api/route/v1"
appsv1 "k8s.io/api/apps/v1"
) )
var ( var (
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment