Skip to content
Open
5 changes: 0 additions & 5 deletions operator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,8 @@ ifndef ignore-not-found
endif

.PHONY: quickstart
ifeq ($(or $(findstring openshift-logging,$(IMG)),$(findstring openshift-logging,$(BUNDLE_IMG))),openshift-logging)
quickstart: $(KIND) ## Quickstart full dev environment on local kind cluster
@./quickstart.sh $(filter-out $@,$(MAKECMDGOALS))
else
quickstart: oci-build oci-push $(KIND)
@./quickstart.sh $(filter-out $@,$(MAKECMDGOALS))
endif

.PHONY: quickstart-cleanup
quickstart-cleanup: $(KIND) ## Cleanup for quickstart set up
Expand Down
2 changes: 1 addition & 1 deletion operator/docs/prologue/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ make quickstart
If you want to test local changes from your repository fork, you need to provide an image registry organization that you own that has an image repository name `loki-operator`(e.g., `quay.io/my-company-org/loki-operator`). The command to use your custom images is:

```shell
make quickstart REGISTRY_BASE=quay.io/my-company-org
make oci-build oci-push quickstart REGISTRY_BASE=quay.io/my-company-org
```

## Further reading
Expand Down
14,655 changes: 11,410 additions & 3,245 deletions operator/hack/addons_cert_manager.yaml

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion operator/hack/addons_logger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ spec:
- args:
- generate
- --destination=loki
- --destination-url=http://token-refresher.default.svc.cluster.local:8080/api/logs/v1/test-oidc/loki/api/v1/push
- --url=http://token-refresher.default.svc.cluster.local:8080/api/logs/v1/test-oidc/loki/api/v1/push
- --tenant=test-oidc
- --disable-security-check
image: quay.io/openshift-logging/cluster-logging-load-client:latest
imagePullPolicy: Always
name: logger
Expand Down
12 changes: 10 additions & 2 deletions operator/hack/addons_token_refresher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ spec:
- --oidc.client-id=$(OIDC_CLIENT_ID)
- --oidc.client-secret=$(OIDC_CLIENT_SECRET)
- --oidc.issuer-url=$(OIDC_ISSUER_URL)
- --url=http://lokistack-dev-gateway-http.default.svc:8080
- --url=https://lokistack-dev-gateway-http.default.svc:8080
- --upstream.ca-file=/etc/certs/service-ca.crt
env:
- name: OIDC_AUDIENCE
valueFrom:
Expand All @@ -61,13 +62,20 @@ spec:
secretKeyRef:
key: issuerUrl
name: token-refresher-oidc
image: quay.io/observatorium/token-refresher:master-2021-03-05-b34376b
image: quay.io/observatorium/token-refresher:master-2024-12-11-08b888a
name: token-refresher
ports:
- containerPort: 8081
name: internal
- containerPort: 8080
name: web
volumeMounts:
- mountPath: /etc/certs
name: certificates
volumes:
- name: certificates
configMap:
name: lokistack-dev-gateway-ca-bundle
---
apiVersion: v1
kind: Service
Expand Down
31 changes: 21 additions & 10 deletions operator/hack/addons_traefik.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ rules:
- apiGroups:
- ""
resources:
- services
- endpoints
- nodes
- secrets
- services
verbs:
- get
- list
Expand Down Expand Up @@ -90,6 +91,14 @@ rules:
- get
- list
- watch
- apiGroups:
- discovery.k8s.io
resources:
- endpointslices
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand All @@ -114,6 +123,8 @@ spec:
selector:
matchLabels:
app: traefik
strategy:
type: Recreate
template:
metadata:
labels:
Expand All @@ -122,27 +133,27 @@ spec:
serviceAccountName: traefik
containers:
- name: traefik
image: traefik:v2.7.0
image: traefik:v3.6.2
args:
- --api.insecure
- --api.dashboard
- --log.level=debug
- --accesslog=true
- --entryPoints.web.address=:80
- --entryPoints.websecure.address=:443
- --entryPoints.traefik.address=:8082
- --entryPoints.web.address=:8081
- --entryPoints.websecure.address=:8443
- --providers.kubernetesIngress
- --providers.file.filename=/config/config.yaml
- --providers.file.watch=false
ports:
- name: http
containerPort: 80
hostPort: 80
containerPort: 8081
hostPort: 8081
- name: https
containerPort: 443
hostPort: 443
containerPort: 8443
- name: admin
containerPort: 8080
hostPort: 8080
containerPort: 8082
hostPort: 8082
securityContext:
capabilities:
drop:
Expand Down
15 changes: 6 additions & 9 deletions operator/hack/kind_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,9 @@ nodes:
kubeletExtraArgs:
node-labels: "ingress-ready=true"
extraPortMappings:
# Ingress Controller Web Port
- containerPort: 80
hostPort: 80
# Ingress Controller Web Secure Port
- containerPort: 443
hostPort: 443
# Ingress Controller Admin Port
- containerPort: 8080
hostPort: 8080
# Traefik Web Port
- containerPort: 8081
hostPort: 8081
# Traefik Admin Port
- containerPort: 8082
hostPort: 8082
9 changes: 7 additions & 2 deletions operator/quickstart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ lokistack(){
echo "- Deploy Loki Stack... -"
echo "-------------------------------------------"
kubectl apply -f ./hack/lokistack_gateway_dev.yaml

echo "-------------------------------------------"
echo "- Wait for LokiStack (~ 90s)... -"
echo "-------------------------------------------"
kubectl wait --for=condition=Ready --timeout=5m lokistack/lokistack-dev
}

logger() {
Expand All @@ -74,7 +79,7 @@ certificates() {

check() {
# shellcheck disable=SC2154
${LOGCLI} --addr "http://localhost/token-refresher/api/logs/v1/test-oidc" labels
${LOGCLI} --addr "http://localhost:8081/token-refresher/api/logs/v1/test-oidc" labels
}

case ${1:-"*"} in
Expand Down Expand Up @@ -112,9 +117,9 @@ help)

*)
setup
certificates
deps
operator
certificates
lokistack
logger
;;
Expand Down
Loading