Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ bundle-build: ## Build the bundle image.

.PHONY: bundle-push
bundle-push: ## Push the bundle image.
$(MAKE) docker-push IMG=$(BUNDLE_IMG)
docker push $(BUNDLE_IMG)

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

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

.PHONY: catalog-install
catalog-install: config/samples/pattern-catalog-$(VERSION).yaml ## Install the OLM catalog on a cluster (for testing).
Expand Down
8 changes: 1 addition & 7 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import (
"sigs.k8s.io/controller-runtime/pkg/healthz"
"sigs.k8s.io/controller-runtime/pkg/log/zap"
"sigs.k8s.io/controller-runtime/pkg/manager"
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"

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

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

mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
Scheme: scheme,
Metrics: metricsserver.Options{
BindAddress: metricsAddr,
},
Scheme: scheme,
HealthProbeBindAddress: probeAddr,
LeaderElection: enableLeaderElection,
LeaderElectionID: "f2850479.hybrid-cloud-patterns.io",
Expand Down
2 changes: 1 addition & 1 deletion config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ patchesStrategicMerge:
# Protect the /metrics endpoint by putting it behind auth.
# If you want your controller-manager to expose the /metrics
# endpoint w/o any authn/z, please comment the following line.
- manager_auth_proxy_patch.yaml
# - manager_auth_proxy_patch.yaml

# Mount the controller config file for loading manager configurations
# through a ComponentConfig type
Expand Down
24 changes: 0 additions & 24 deletions config/default/manager_auth_proxy_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,7 @@ spec:
template:
spec:
containers:
- name: kube-rbac-proxy
image: quay.io/hybridcloudpatterns/kube-rbac-proxy:v0.8.0
args:
- "--secure-listen-address=0.0.0.0:8443"
- "--upstream=http://127.0.0.1:8080/"
- "--logtostderr=true"
- "--v=10"
ports:
- containerPort: 8443
protocol: TCP
name: https
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 5m
memory: 64Mi
- name: manager
args:
- "--health-probe-bind-address=:8081"
- "--metrics-bind-address=127.0.0.1:8080"
- "--leader-elect"
9 changes: 0 additions & 9 deletions config/rbac/auth_proxy_client_clusterrole.yaml

This file was deleted.

17 changes: 0 additions & 17 deletions config/rbac/auth_proxy_role.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions config/rbac/auth_proxy_role_binding.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions config/rbac/auth_proxy_service.yaml

This file was deleted.

8 changes: 4 additions & 4 deletions config/rbac/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ resources:
# Comment the following 4 lines if you want to disable
# the auth proxy (https://github.com/brancz/kube-rbac-proxy)
# which protects your /metrics endpoint.
- auth_proxy_service.yaml
- auth_proxy_role.yaml
- auth_proxy_role_binding.yaml
- auth_proxy_client_clusterrole.yaml
#- auth_proxy_service.yaml
#- auth_proxy_role.yaml
#- auth_proxy_role_binding.yaml
#- auth_proxy_client_clusterrole.yaml
3 changes: 2 additions & 1 deletion hack/operator-build-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ NS="openshift-operators"
OPERATOR="patterns-operator"
VERSION="${VERSION:-6.6.6}"
REGISTRY="${REGISTRY:-kuemper.int.rhx/bandini}"
UPLOADREGISTRY="${UPLOADREGISTRY:-kuemper.int.rhx/bandini}"

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

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

Expand Down