Skip to content

Commit a485c1e

Browse files
committed
foo
1 parent b1a3e2a commit a485c1e

File tree

8 files changed

+108
-87
lines changed

8 files changed

+108
-87
lines changed

.github/workflows/helm-tests.yml

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -125,50 +125,7 @@ jobs:
125125
- name: Debug failed deployment
126126
if: failure()
127127
run: |
128-
echo "=== Deployment failed - collecting debug information ==="
129-
kubectl get pods -o wide
130-
kubectl get jobs -o wide
131-
kubectl get services -o wide
132-
kubectl get events --sort-by='.lastTimestamp' | tail -20 || true
133-
134-
# Check Knative installation status
135-
echo "=== Knative Installation Status ==="
136-
kubectl get pods -n knative-serving -o wide || echo "Knative Serving not installed"
137-
kubectl get pods -n knative-eventing -o wide || echo "Knative Eventing not installed"
138-
kubectl get pods -n kourier-system -o wide || echo "Kourier not installed"
139-
# Check Knative CRDs
140-
echo "=== Knative CRDs Status ==="
141-
kubectl get crd | grep knative || echo "No Knative CRDs found"
142-
kubectl get crd sinkbindings.sources.knative.dev || echo "SinkBinding CRD not found"
143-
144-
# Check Traefik status
145-
echo "=== Traefik Status ==="
146-
kubectl get pods -n kube-system -l app.kubernetes.io/name=traefik -o wide || echo "No Traefik pods found"
147-
kubectl get crd | grep traefik || echo "No Traefik CRDs found"
148-
kubectl get crd middlewares.traefik.io || echo "Middleware CRD not found"
149-
kubectl get crd ingressroutes.traefik.io || echo "IngressRoute CRD not found"
150-
151-
# Check notification system final status
152-
echo "=== Notification System Final Status ==="
153-
kubectl get deployments -l app.kubernetes.io/name=eoapi-notifier -o wide || echo "No eoapi-notifier deployment"
154-
kubectl get pods -l app.kubernetes.io/name=eoapi-notifier -o wide || echo "No eoapi-notifier pods"
155-
kubectl get ksvc -n eoapi -o wide || echo "No Knative services in eoapi namespace"
156-
kubectl get ksvc eoapi-cloudevents-sink -n eoapi -o wide || echo "No eoapi-cloudevents-sink Knative service"
157-
kubectl get pods -l serving.knative.dev/service=eoapi-cloudevents-sink -n eoapi -o wide || echo "No CloudEvents sink pods"
158-
# Check SinkBinding resources
159-
echo "=== SinkBinding Resources ==="
160-
kubectl get sinkbindings -A -o wide || echo "No SinkBinding resources found"
161-
162-
# Show notification logs if they exist
163-
echo "=== eoapi-notifier Logs ==="
164-
kubectl logs -l app.kubernetes.io/name=eoapi-notifier --tail=20 || echo "No eoapi-notifier logs"
165-
echo "=== Knative CloudEvents Sink Logs ==="
166-
kubectl logs -l serving.knative.dev/service=eoapi-cloudevents-sink -n eoapi --tail=20 || echo "No CloudEvents sink logs"
167-
# Show Knative system logs if there are issues
168-
echo "=== Knative Serving Controller Logs ==="
169-
kubectl logs -n knative-serving -l app=controller --tail=20 || echo "No Knative Serving controller logs"
170-
echo "=== Knative Eventing Controller Logs ==="
171-
kubectl logs -n knative-eventing -l app=eventing-controller --tail=20 || echo "No Knative Eventing controller logs"
128+
./scripts/debug-deployment.sh
172129
173130
174131
- name: Cleanup
Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
1-
{{- if and (index .Values "eoapi-notifier").enabled .Values.knative.enabled .Values.knative.cloudEventsSink.enabled }}
1+
{{- $hasCloudEventsOutput := false }}
22
{{- range (index .Values "eoapi-notifier").outputs }}
33
{{- if eq .type "cloudevents" }}
4+
{{- $hasCloudEventsOutput = true }}
5+
{{- end }}
6+
{{- end }}
7+
{{- if and (index .Values "eoapi-notifier").enabled .Values.knative.enabled .Values.knative.cloudEventsSink.enabled $hasCloudEventsOutput }}
48
---
59
apiVersion: serving.knative.dev/v1
610
kind: Service
711
metadata:
812
name: eoapi-cloudevents-sink
9-
namespace: {{ $.Release.Namespace }}
13+
namespace: {{ .Release.Namespace }}
1014
labels:
11-
{{- include "eoapi.labels" $ | nindent 4 }}
15+
{{- include "eoapi.labels" . | nindent 4 }}
1216
app.kubernetes.io/component: cloudevents-sink
1317
annotations:
1418
helm.sh/hook: "post-install,post-upgrade"
15-
helm.sh/hook-weight: "5"
19+
helm.sh/hook-weight: "10"
1620
helm.sh/hook-delete-policy: "before-hook-creation"
1721
spec:
1822
template:
@@ -21,20 +25,21 @@ spec:
2125
autoscaling.knative.dev/minScale: "1"
2226
autoscaling.knative.dev/maxScale: "1"
2327
labels:
24-
{{- include "eoapi.selectorLabels" $ | nindent 8 }}
28+
{{- include "eoapi.selectorLabels" . | nindent 8 }}
2529
app.kubernetes.io/component: cloudevents-sink
2630
spec:
2731
containers:
2832
- name: cloudevents-sink
29-
image: {{ $.Values.knative.cloudEventsSink.image }}
33+
image: {{ .Values.knative.cloudEventsSink.image }}
3034
ports:
3135
- containerPort: 8080
3236
env:
3337
- name: TARGET
3438
value: "CloudEvents Sink"
39+
- name: PORT
40+
value: "8080"
41+
- name: LOG_LEVEL
42+
value: "info"
3543
resources:
36-
{{- toYaml $.Values.knative.cloudEventsSink.resources | nindent 10 }}
37-
{{- break }}
38-
{{- end }}
39-
{{- end }}
44+
{{- toYaml .Values.knative.cloudEventsSink.resources | nindent 10 }}
4045
{{- end }}

charts/eoapi/templates/knative-init.yaml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ spec:
2020
app.kubernetes.io/component: knative-init
2121
spec:
2222
restartPolicy: Never
23+
serviceAccountName: {{ include "eoapi.serviceAccountName" . }}
2324
containers:
2425
- name: knative-init
2526
image: bitnami/kubectl:latest
@@ -33,7 +34,7 @@ spec:
3334
3435
# Wait for knative-operator to be ready
3536
echo "Waiting for knative-operator..."
36-
kubectl rollout status deployment/knative-operator -n default --timeout=300s
37+
kubectl rollout status deployment/knative-operator -n default --timeout={{ .Values.knative.initTimeout | default "600s" }}
3738
3839
# Create namespaces
3940
kubectl create namespace knative-serving --dry-run=client -o yaml | kubectl apply -f -
@@ -50,6 +51,14 @@ spec:
5051
version: {{ .Values.knative.version | quote }}
5152
EOF
5253
54+
if [ $? -eq 0 ]; then
55+
echo "✅ KnativeServing created successfully"
56+
else
57+
echo "❌ Failed to create KnativeServing. Checking operator status..."
58+
kubectl get pods -n default -l name=knative-operator
59+
exit 1
60+
fi
61+
5362
# Create KnativeEventing
5463
cat <<EOF | kubectl apply -f -
5564
apiVersion: operator.knative.dev/v1beta1
@@ -61,15 +70,23 @@ spec:
6170
version: {{ .Values.knative.version | quote }}
6271
EOF
6372
73+
if [ $? -eq 0 ]; then
74+
echo "✅ KnativeEventing created successfully"
75+
else
76+
echo "❌ Failed to create KnativeEventing. Checking operator status..."
77+
kubectl get pods -n default -l name=knative-operator
78+
exit 1
79+
fi
80+
6481
echo "✅ Knative CRs created. Operator will install CRDs."
6582
6683
resources:
6784
requests:
85+
cpu: 25m
86+
memory: 32Mi
87+
limits:
6888
cpu: 50m
6989
memory: 64Mi
70-
limits:
71-
cpu: 100m
72-
memory: 128Mi
7390
backoffLimit: 3
7491
activeDeadlineSeconds: 600
7592
{{- end }}

charts/eoapi/templates/services/rbac.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,14 @@ rules:
2222
resources: ["customresourcedefinitions"]
2323
verbs: ["get", "list"]
2424
- apiGroups: [""]
25-
resources: ["pods"]
25+
resources: ["pods", "namespaces"]
26+
verbs: ["get", "list", "create"]
27+
- apiGroups: ["apps"]
28+
resources: ["deployments"]
2629
verbs: ["get", "list"]
30+
- apiGroups: ["operator.knative.dev"]
31+
resources: ["knativeservings", "knativeeventings"]
32+
verbs: ["get", "list", "create"]
2733
---
2834
apiVersion: rbac.authorization.k8s.io/v1
2935
kind: ClusterRoleBinding

charts/eoapi/test-local-values.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,34 +29,34 @@ raster:
2929
enabled: true
3030
settings:
3131
resources:
32-
limits:
33-
cpu: "768m"
34-
memory: "2048Mi" # Reduced from 4096Mi for local
3532
requests:
3633
cpu: "256m"
3734
memory: "1024Mi"
35+
limits:
36+
cpu: "768m"
37+
memory: "2048Mi" # Reduced from 4096Mi for local
3838

3939
stac:
4040
enabled: true
4141
settings:
4242
resources:
43-
limits:
44-
cpu: "1280m"
45-
memory: "1536Mi"
4643
requests:
4744
cpu: "512m"
4845
memory: "1024Mi"
46+
limits:
47+
cpu: "1280m"
48+
memory: "1536Mi"
4949

5050
vector:
5151
enabled: true
5252
settings:
5353
resources:
54-
limits:
55-
cpu: "768m"
56-
memory: "1536Mi"
5754
requests:
5855
cpu: "256m"
5956
memory: "1024Mi"
57+
limits:
58+
cpu: "768m"
59+
memory: "1536Mi"
6060
envVars:
6161
TIPG_DEBUG: "True"
6262

charts/eoapi/values.yaml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -528,33 +528,32 @@ eoapi-notifier:
528528
# Optional Knative components for CloudEvents and serverless workloads
529529
knative:
530530
enabled: false
531-
version: "v1.19.6"
531+
version: "v1.19.4"
532+
initTimeout: "600s"
532533
# CloudEvents sink configuration (deployed when eoapi-notifier uses CloudEvents output)
533534
cloudEventsSink:
534535
enabled: false
535-
image: gcr.io/knative-samples/helloworld-go
536+
image: registry.k8s.io/ingress-nginx/kube-webhook-certgen:v1.3.0
536537
resources:
537538
requests:
539+
cpu: 50m
540+
memory: 64Mi
541+
limits:
538542
cpu: 100m
539543
memory: 128Mi
540-
limits:
541-
cpu: 200m
542-
memory: 256Mi
543544

544545
# Knative operator sub-chart configuration
545546
# These values are passed directly to the knative-operator sub-chart
546547
# The operator will be installed and can then deploy Knative Serving/Eventing via CRs
547548
knative-operator:
548-
knative_operator:
549-
knative_operator:
550-
tag: "v1.19.4"
551-
resources:
552-
requests:
553-
cpu: 100m
554-
memory: 100Mi
555-
limits:
556-
cpu: 500m
557-
memory: 500Mi
549+
tag: "v1.19.4"
550+
resources:
551+
requests:
552+
cpu: 50m
553+
memory: 64Mi
554+
limits:
555+
cpu: 200m
556+
memory: 256Mi
558557

559558
######################
560559
# VERSION MANAGEMENT

scripts/debug-deployment.sh

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
echo "=== Deployment Debug Information ==="
6+
7+
# Basic cluster status
8+
echo "--- Cluster Status ---"
9+
kubectl get pods -o wide
10+
kubectl get jobs -o wide
11+
kubectl get services -o wide
12+
kubectl get events --sort-by='.lastTimestamp' | tail -20 || true
13+
14+
# Knative status
15+
echo "--- Knative Status ---"
16+
kubectl get pods -n knative-serving -o wide || echo "Knative Serving not installed"
17+
kubectl get pods -n knative-eventing -o wide || echo "Knative Eventing not installed"
18+
kubectl get crd | grep knative || echo "No Knative CRDs found"
19+
20+
# Traefik status
21+
echo "--- Traefik Status ---"
22+
kubectl get pods -n kube-system -l app.kubernetes.io/name=traefik -o wide || echo "No Traefik pods"
23+
kubectl get crd | grep traefik || echo "No Traefik CRDs found"
24+
25+
# eoAPI notification system
26+
echo "--- Notification System ---"
27+
kubectl get deployments -l app.kubernetes.io/name=eoapi-notifier -o wide || echo "No eoapi-notifier deployment"
28+
kubectl get ksvc -A -o wide || echo "No Knative services"
29+
kubectl get sinkbindings -A -o wide || echo "No SinkBinding resources"
30+
31+
# Logs from key components
32+
echo "--- Key Component Logs ---"
33+
kubectl logs -l app.kubernetes.io/name=eoapi-notifier --tail=20 || echo "No eoapi-notifier logs"
34+
kubectl logs -l serving.knative.dev/service=eoapi-cloudevents-sink --tail=20 || echo "No CloudEvents sink logs"
35+
36+
# System controller logs if issues detected
37+
if ! kubectl get pods -n knative-serving &>/dev/null; then
38+
echo "--- Knative Controller Logs ---"
39+
kubectl logs -n knative-serving -l app=controller --tail=20 || echo "No Knative Serving controller logs"
40+
kubectl logs -n knative-eventing -l app=eventing-controller --tail=20 || echo "No Knative Eventing controller logs"
41+
fi

scripts/deploy.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,6 @@ install_pgo() {
8181
kubectl get pods -l postgres-operator.crunchydata.com/control-plane=postgres-operator
8282
}
8383

84-
85-
86-
87-
8884
# Integrated Helm dependency setup
8985
setup_helm_dependencies() {
9086
log_info "Setting up Helm dependencies..."

0 commit comments

Comments
 (0)