Skip to content

Commit ff556ed

Browse files
committed
Fix crashbackloop in Make Deploy
1 parent 473b6f1 commit ff556ed

File tree

5 files changed

+37
-4
lines changed

5 files changed

+37
-4
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ endif
1414
BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL)
1515

1616
# Image URL to use all building/pushing image targets
17-
IMG ?= stakater/slack-operator:v$(VERSION)
17+
IMG ?= stakater/slack-operator:SNAPSHOT-PR-42-b56a7463
1818
# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
1919
CRD_OPTIONS ?= "crd:trivialVersions=true,crdVersions=v1,preserveUnknownFields=false"
2020

api/v1alpha1/channel_webhook.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ func (r *Channel) ValidateCreate() error {
5959
if len(r.Spec.Users) < 1 {
6060
return fmt.Errorf("Users can not be empty")
6161
}
62+
if r.Spec.Topic == "test" {
63+
return fmt.Errorf("Users can not be empty")
64+
}
6265

6366
return nil
6467
}

config/default/manager_auth_proxy_patch.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This patch inject a sidecar container which is a HTTP proxy for the
1+
# This patch inject a sidecar container which is a HTTP proxy for the
22
# controller manager, it performs RBAC authorization against the Kubernetes API using SubjectAccessReviews.
33
apiVersion: apps/v1
44
kind: Deployment
@@ -10,7 +10,7 @@ spec:
1010
spec:
1111
containers:
1212
- name: kube-rbac-proxy
13-
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0
13+
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0
1414
args:
1515
- "--secure-listen-address=0.0.0.0:8443"
1616
- "--upstream=http://127.0.0.1:8080/"
@@ -21,6 +21,5 @@ spec:
2121
name: https
2222
- name: manager
2323
args:
24-
- "--health-probe-bind-address=:8081"
2524
- "--metrics-bind-address=127.0.0.1:8080"
2625
- "--leader-elect"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: controller-manager
5+
namespace: system
6+
spec:
7+
template:
8+
spec:
9+
containers:
10+
- name: manager
11+
args:
12+
- "--config=controller_manager_config.yaml"
13+
volumeMounts:
14+
- name: manager-config
15+
mountPath: /controller_manager_config.yaml
16+
subPath: controller_manager_config.yaml
17+
volumes:
18+
- name: manager-config
19+
configMap:
20+
name: manager-config
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: controller-runtime.sigs.k8s.io/v1alpha1
2+
kind: ControllerManagerConfig
3+
health:
4+
healthProbeBindAddress: :8081
5+
metrics:
6+
bindAddress: 127.0.0.1:8080
7+
webhook:
8+
port: 9443
9+
leaderElection:
10+
leaderElect: true
11+
resourceName: 957ea167.stakater.com

0 commit comments

Comments
 (0)