Skip to content

Commit 1dc8f2d

Browse files
Merge pull request #456 from mbaldessari/drop-kube-rbac
Drop metrics and build fixes
2 parents 09a180e + c4dedbc commit 1dc8f2d

10 files changed

+10
-92
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ bundle-build: ## Build the bundle image.
303303

304304
.PHONY: bundle-push
305305
bundle-push: ## Push the bundle image.
306-
$(MAKE) docker-push IMG=$(BUNDLE_IMG)
306+
docker push $(BUNDLE_IMG)
307307

308308
.PHONY: csv-date
309309
csv-date: ## Set createdAt date in the CSV.
@@ -362,7 +362,7 @@ catalog-build: opm ## Build an OLM catalog image (for testing).
362362

363363
.PHONY: catalog-push
364364
catalog-push: ## Push the OLM catalog image (for testing).
365-
$(MAKE) docker-push IMG=$(CATALOG_IMG)
365+
docker push $(CATALOG_IMG)
366366

367367
.PHONY: catalog-install
368368
catalog-install: config/samples/pattern-catalog-$(VERSION).yaml ## Install the OLM catalog on a cluster (for testing).

cmd/main.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ import (
3838
"sigs.k8s.io/controller-runtime/pkg/healthz"
3939
"sigs.k8s.io/controller-runtime/pkg/log/zap"
4040
"sigs.k8s.io/controller-runtime/pkg/manager"
41-
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
4241

4342
argov1beta1api "github.com/argoproj-labs/argocd-operator/api/v1beta1"
4443
gitopsv1alpha1 "github.com/hybrid-cloud-patterns/patterns-operator/api/v1alpha1"
@@ -63,10 +62,8 @@ func init() {
6362
}
6463

6564
func main() {
66-
var metricsAddr string
6765
var enableLeaderElection bool
6866
var probeAddr string
69-
flag.StringVar(&metricsAddr, "metrics-bind-address", ":8080", "The address the metric endpoint binds to.")
7067
flag.StringVar(&probeAddr, "health-probe-bind-address", ":8081", "The address the probe endpoint binds to.")
7168
flag.BoolVar(&enableLeaderElection, "leader-elect", false,
7269
"Enable leader election for controller manager. "+
@@ -88,10 +85,7 @@ func main() {
8885
}
8986

9087
mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
91-
Scheme: scheme,
92-
Metrics: metricsserver.Options{
93-
BindAddress: metricsAddr,
94-
},
88+
Scheme: scheme,
9589
HealthProbeBindAddress: probeAddr,
9690
LeaderElection: enableLeaderElection,
9791
LeaderElectionID: "f2850479.hybrid-cloud-patterns.io",

config/default/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ patchesStrategicMerge:
2828
# Protect the /metrics endpoint by putting it behind auth.
2929
# If you want your controller-manager to expose the /metrics
3030
# endpoint w/o any authn/z, please comment the following line.
31-
- manager_auth_proxy_patch.yaml
31+
# - manager_auth_proxy_patch.yaml
3232

3333
# Mount the controller config file for loading manager configurations
3434
# through a ComponentConfig type

config/default/manager_auth_proxy_patch.yaml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,7 @@ spec:
99
template:
1010
spec:
1111
containers:
12-
- name: kube-rbac-proxy
13-
image: quay.io/hybridcloudpatterns/kube-rbac-proxy:v0.8.0
14-
args:
15-
- "--secure-listen-address=0.0.0.0:8443"
16-
- "--upstream=http://127.0.0.1:8080/"
17-
- "--logtostderr=true"
18-
- "--v=10"
19-
ports:
20-
- containerPort: 8443
21-
protocol: TCP
22-
name: https
23-
securityContext:
24-
allowPrivilegeEscalation: false
25-
capabilities:
26-
drop:
27-
- ALL
28-
resources:
29-
limits:
30-
cpu: 500m
31-
memory: 128Mi
32-
requests:
33-
cpu: 5m
34-
memory: 64Mi
3512
- name: manager
3613
args:
3714
- "--health-probe-bind-address=:8081"
38-
- "--metrics-bind-address=127.0.0.1:8080"
3915
- "--leader-elect"

config/rbac/auth_proxy_client_clusterrole.yaml

Lines changed: 0 additions & 9 deletions
This file was deleted.

config/rbac/auth_proxy_role.yaml

Lines changed: 0 additions & 17 deletions
This file was deleted.

config/rbac/auth_proxy_role_binding.yaml

Lines changed: 0 additions & 12 deletions
This file was deleted.

config/rbac/auth_proxy_service.yaml

Lines changed: 0 additions & 15 deletions
This file was deleted.

config/rbac/kustomization.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ resources:
1212
# Comment the following 4 lines if you want to disable
1313
# the auth proxy (https://github.com/brancz/kube-rbac-proxy)
1414
# which protects your /metrics endpoint.
15-
- auth_proxy_service.yaml
16-
- auth_proxy_role.yaml
17-
- auth_proxy_role_binding.yaml
18-
- auth_proxy_client_clusterrole.yaml
15+
#- auth_proxy_service.yaml
16+
#- auth_proxy_role.yaml
17+
#- auth_proxy_role_binding.yaml
18+
#- auth_proxy_client_clusterrole.yaml

hack/operator-build-deploy.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ NS="openshift-operators"
66
OPERATOR="patterns-operator"
77
VERSION="${VERSION:-6.6.6}"
88
REGISTRY="${REGISTRY:-kuemper.int.rhx/bandini}"
9+
UPLOADREGISTRY="${UPLOADREGISTRY:-kuemper.int.rhx/bandini}"
910

1011
wait_for_resource() {
1112
local resource_type=$1 # Either "packagemanifest", "operator", or "csv"
@@ -74,7 +75,7 @@ if [ $ret -ne 0 ]; then
7475
exit 1
7576
fi
7677

77-
make VERSION=${VERSION} IMAGE_TAG_BASE=${REGISTRY}/patterns-operator CHANNELS=fast USE_IMAGE_DIGESTS="" \
78+
make VERSION=${VERSION} UPLOADREGISTRY="${UPLOADREGISTRY}" IMAGE_TAG_BASE=${REGISTRY}/patterns-operator CHANNELS=fast USE_IMAGE_DIGESTS="" \
7879
manifests bundle generate docker-build docker-push bundle-build bundle-push catalog-build \
7980
catalog-push catalog-install
8081

0 commit comments

Comments
 (0)