-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add istio dependency #7
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -176,6 +176,7 @@ uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified | |
deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config. | ||
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG} | ||
$(KUSTOMIZE) build config/deploy | kubectl apply -f - | ||
${MAKE} post-deploy-hacks | ||
|
||
undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config. | ||
$(KUSTOMIZE) build config/deploy | kubectl delete -f - | ||
|
@@ -190,10 +191,20 @@ uninstall-olm: | |
|
||
deploy-olm: ## Deploy controller to the K8s cluster specified in ~/.kube/config using OLM catalog image. | ||
$(KUSTOMIZE) build config/deploy/olm | kubectl apply -f - | ||
${MAKE} post-deploy-hacks | ||
|
||
undeploy-olm: ## Undeploy controller from the K8s cluster specified in ~/.kube/config using OLM catalog image. | ||
$(KUSTOMIZE) build config/deploy/olm | kubectl delete -f - | ||
|
||
#This target is temporary to aid dev/test of the operator. Eventually it will be the responsibility of the | ||
# operator itself to create/configure these things as part of the reconciliation of a kuadrant CR. | ||
post-deploy-hacks: | ||
# Wait for deployment to complete | ||
timeout 60s bash -c 'until kubectl -n kuadrant-system get deployments/kuadrant-operator-controller-manager; do sleep 10; done;' | ||
kubectl -n kuadrant-system wait --timeout=300s --for=condition=Available deployments --all | ||
kubectl apply -f config/dependencies/istio/default-gateway.yaml -n kuadrant-system | ||
kubectl apply -f config/dependencies/authorino/authorino.yaml -n kuadrant-system | ||
|
||
CONTROLLER_GEN = $(shell pwd)/bin/controller-gen | ||
controller-gen: ## Download controller-gen locally if necessary. | ||
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/[email protected]) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: operator.authorino.kuadrant.io/v1beta1 | ||
kind: Authorino | ||
metadata: | ||
name: authorino | ||
namespace: kuadrant-system | ||
spec: | ||
replicas: 1 | ||
clusterWide: false | ||
listener: | ||
tls: | ||
enabled: false | ||
oidcServer: | ||
tls: | ||
enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
resources: | ||
- github.com/Kuadrant/kuadrant-controller/config/default?ref=${KUADRANT_CONTROLLER_GITREF} | ||
|
||
patchesStrategicMerge: | ||
- delete-ns.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
resources: | ||
- github.com/Kuadrant/kuadrant-controller/config/default?ref=main | ||
|
||
patchesStrategicMerge: | ||
- delete-ns.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: networking.istio.io/v1alpha3 | ||
kind: Gateway | ||
metadata: | ||
name: kuadrant-gateway | ||
namespace: kuadrant-system | ||
spec: | ||
selector: | ||
istio: ingressgateway | ||
servers: | ||
- port: | ||
number: 80 | ||
name: http | ||
protocol: HTTP | ||
hosts: | ||
- "*" |
9 changes: 9 additions & 0 deletions
9
config/dependencies/istio/patches/istio-externalProvider.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: install.istio.io/v1alpha1 | ||
kind: IstioOperator | ||
spec: | ||
meshConfig: | ||
extensionProviders: | ||
- name: "kuadrant-authorization" | ||
envoyExtAuthzGrpc: | ||
service: "authorino-authorino-authorization.kuadrant-system.svc.cluster.local" | ||
port: 50051 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
namespace: kuadrant-operator-system | ||
namespace: kuadrant-system | ||
|
||
resources: | ||
- controller | ||
- authorino | ||
- limitador | ||
|
||
patchesStrategicMerge: | ||
- controller/delete-ns.yaml | ||
- authorino/delete-ns.yaml | ||
- limitador/delete-ns.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
namespace: kuadrant-operator-system | ||
namespace: kuadrant-system | ||
|
||
resources: | ||
- ../default | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
|
||
##@ Istio | ||
|
||
## Targets to help install and configure istio | ||
|
||
ISTIO_PATCHES_DIR = config/dependencies/istio/patches | ||
ISTIO_NAMESPACE = istio-system | ||
ISTIO_INSTALL_OPTIONS ?= --set profile=default \ | ||
--set values.gateways.istio-ingressgateway.autoscaleEnabled=false \ | ||
--set values.pilot.autoscaleEnabled=false \ | ||
--set values.global.istioNamespace=$(ISTIO_NAMESPACE) | ||
|
||
# istioctl tool | ||
ISTIOCTL=$(shell pwd)/bin/istioctl | ||
ISTIOVERSION = 1.12.1 | ||
$(ISTIOCTL): | ||
mkdir -p $(PROJECT_PATH)/bin | ||
$(eval TMP := $(shell mktemp -d)) | ||
cd $(TMP); curl -sSL https://istio.io/downloadIstio | ISTIO_VERSION=$(ISTIOVERSION) sh - | ||
cp $(TMP)/istio-$(ISTIOVERSION)/bin/istioctl ${ISTIOCTL} | ||
-rm -rf $(TMP) | ||
|
||
.PHONY: istioctl | ||
istioctl: $(ISTIOCTL) ## Download istioctl locally if necessary. | ||
|
||
.PHONY: istio-install | ||
istio-install: istioctl ## Install istio. | ||
$(ISTIOCTL) install -y $(ISTIO_INSTALL_OPTIONS) | ||
|
||
#Note: This target is here temporarily to aid dev/test of the operator. Eventually it will be the responsibility of the | ||
# operator itself to configure istio as part of the reconciliation of a kuadrant CR. | ||
.PHONY: istio-install-with-patch | ||
istio-install-with-patch: istioctl ## Install istio with patch to add authorino auth extension. | ||
$(ISTIOCTL) install -y $(ISTIO_INSTALL_OPTIONS) -f $(ISTIO_PATCHES_DIR)/istio-externalProvider.yaml | ||
|
||
.PHONY: istio-uninstall | ||
istio-uninstall: istioctl ## Uninstall istio. | ||
$(ISTIOCTL) x uninstall -y --purge | ||
|
||
.PHONY: istio-verify-install | ||
istio-verify-install: istioctl ## Verify istio installation. | ||
$(ISTIOCTL) verify-install -i $(ISTIO_NAMESPACE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove the rbac proxy from the deployment. Maybe in other PR.
We removed it from the 3scale operator 3scale/3scale-operator#692
3scale Ops team has also removed the rbac proxy from their operator 3scale-ops/prometheus-exporter-operator#26
Check out for the reasons in the PRs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created follow up JIRA for this https://issues.redhat.com/browse/KUADRANT-32