Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
drupal
paas
drupalSite-operator
Commits
d4598ed0
Commit
d4598ed0
authored
Feb 03, 2021
by
Konstantinos Samaras-Tsakiris
Browse files
Watch labels
parent
dcb67303
Pipeline
#2285859
passed with stages
in 9 minutes and 54 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
controllers/drupalsite_controller.go
View file @
d4598ed0
...
...
@@ -29,8 +29,12 @@ import (
corev1
"k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/runtime"
m_metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
m_labels
"k8s.io/apimachinery/pkg/labels"
ctrl
"sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/builder"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/predicate"
"sigs.k8s.io/controller-runtime/pkg/reconcile"
)
...
...
@@ -143,6 +147,8 @@ func (r *DrupalSiteReconciler) Reconcile(ctx context.Context, req ctrl.Request)
func
(
r
*
DrupalSiteReconciler
)
SetupWithManager
(
mgr
ctrl
.
Manager
)
error
{
return
ctrl
.
NewControllerManagedBy
(
mgr
)
.
For
(
&
webservicesv1a1
.
DrupalSite
{})
.
Owns
(
&
buildv1
.
BuildConfig
{},
builder
.
WithPredicates
(
predicate
.
LabelSelectorPredicate
(
m_metav1
.
SetAsLabelSelector
(
m_labels
.
Set
{
"key"
:
"value"
})))
.
Owns
(
&
imagev1
.
ImageStream
{})
.
Owns
(
&
appsv1
.
DeploymentConfig
{})
.
Owns
(
&
corev1
.
Service
{})
.
Owns
(
&
corev1
.
PersistentVolumeClaim
{})
.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment