Skip to content

Commit 3a4d0c9

Browse files
committed
funca
1 parent 645d449 commit 3a4d0c9

File tree

3 files changed

+84
-2
lines changed

3 files changed

+84
-2
lines changed

Taskfile.yaml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,22 @@ tasks:
204204
- task: dev:load
205205
- task: dev:deploy
206206

207+
ci:setup:
208+
desc: Setup a CI-like environment (no observability)
209+
silent: true
210+
cmds:
211+
- task: test-infra:cluster-up
212+
- echo "⚠️ Skipping observability installation (CI mode)"
213+
- task: dev:install-dependencies
214+
vars:
215+
NATS_CONFIG_DIR: config/dependencies/nats-ci
216+
- task: dev:build
217+
- task: dev:load
218+
- task: dev:load
219+
- task: dev:deploy
220+
vars:
221+
OVERLAY_DIR: config/overlays/ci
222+
207223
dev:install-dependencies:
208224
desc: Install all infrastructure dependencies (NATS)
209225
silent: true
@@ -239,7 +255,7 @@ tasks:
239255
echo "📦 Installing NATS for event streaming..."
240256
241257
echo "Applying NATS resources..."
242-
task test-infra:kubectl -- apply -k config/dependencies/nats
258+
task test-infra:kubectl -- apply -k {{.NATS_CONFIG_DIR | default "config/dependencies/nats"}}
243259
244260
echo "Waiting for NATS namespace to be created..."
245261
task test-infra:kubectl -- wait --for=jsonpath='{.status.phase}'=Active namespace/nats-system --timeout=500s 2>/dev/null || echo "⚠️ Namespace not ready yet"
@@ -315,7 +331,7 @@ tasks:
315331
316332
echo ""
317333
echo "📋 Deploying Search server and components..."
318-
task test-infra:kubectl -- apply -k config/overlays/dev
334+
task test-infra:kubectl -- apply -k {{.OVERLAY_DIR | default "config/overlays/dev"}}
319335
320336
echo "⏳ Waiting for Search API Server to be ready..."
321337
task test-infra:kubectl -- wait --for=condition=available deployment/search-apiserver -n search-system --timeout=500s 2>/dev/null || echo "⚠️ Search API Server not ready yet"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
resources:
5+
- ../nats
6+
7+
patches:
8+
- target:
9+
kind: HelmRelease
10+
name: nats
11+
namespace: nats-system
12+
patch: |-
13+
- op: replace
14+
path: /spec/values/promExporter/podMonitor/enabled
15+
value: false
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
namespace: search-system
5+
6+
resources:
7+
- ../../base
8+
# Controller manager with RBAC
9+
- ../../controller-manager/overlays/core-control-plane
10+
11+
# Include components for CI environment
12+
components:
13+
- ../../components/namespace
14+
- ../../components/api-registration
15+
- ../../components/cert-manager-ca
16+
# Observability excluded for CI as Prometheus CRDs are not present
17+
# - ../../components/observability
18+
- ../../components/tracing
19+
- ../../components/vector-sidecar
20+
21+
# Override image tag for dev builds
22+
images:
23+
- name: ghcr.io/datum-cloud/search
24+
newTag: dev
25+
26+
patches:
27+
- target:
28+
kind: APIService
29+
name: v1alpha1.policy.search.miloapis.com
30+
patch: |-
31+
- op: add
32+
path: /metadata/annotations
33+
value:
34+
cert-manager.io/inject-ca-from: search-system/search-ca
35+
- target:
36+
kind: APIService
37+
name: v1alpha1.search.miloapis.com
38+
patch: |-
39+
- op: add
40+
path: /metadata/annotations
41+
value:
42+
cert-manager.io/inject-ca-from: search-system/search-ca
43+
# Disable PodMonitor in Vector sidecar as Prometheus CRDs are not present
44+
- target:
45+
kind: HelmRelease
46+
name: vector-sidecar
47+
namespace: search-system
48+
patch: |-
49+
- op: replace
50+
path: /spec/values/podMonitor/enabled
51+
value: false

0 commit comments

Comments
 (0)