Skip to content

Commit bd6b054

Browse files
committed
HYPERFLEET-610: Add OCI/OKE deployment targets
Add make install-all-oci target that deploys HyperFleet on Oracle Kubernetes Engine with in-cluster RabbitMQ, quay.io v0.2.0 images, and adapter1. GCP-specific PodMonitoring CRDs are disabled via a sentinel values-oci.yaml overlay. Pin sentinel chart to v0.2.0 tag for OCI deployments to match the v0.2.0 binary config format.
1 parent 35e2d8f commit bd6b054

6 files changed

Lines changed: 107 additions & 5 deletions

File tree

Makefile

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11

22
.DEFAULT_GOAL := help
33

4-
# Possible envs are gcp, e2e-gcp, kind, e2e-kind
4+
# Possible envs are gcp, e2e-gcp, kind, e2e-kind, oci
55
# Default to gcp
66
HELMFILE_ENV ?= gcp
77

88

9-
ifeq ($(findstring gcp,$(HELMFILE_ENV)),)
9+
ifeq ($(HELMFILE_ENV),oci)
10+
-include env.oci
11+
else ifeq ($(findstring gcp,$(HELMFILE_ENV)),)
1012
-include env.kind
1113
else
1214
-include env.gcp
@@ -273,8 +275,9 @@ check-helmfile-env-generated: ## Check that the generated directory exists based
273275
elif [ "$(HELMFILE_ENV)" = "kind" ]; then \
274276
test -d $(GENERATED_RABBITMQ_DIR) || { echo "ERROR: generated-values-rabbitmq directory does not exist"; exit 1; }; \
275277
echo "OK: generated-values-rabbitmq directory exists"; \
278+
else \
279+
echo "OK: no generated values needed for environment: $(HELMFILE_ENV)"; \
276280
fi
277-
@echo "OK: Did not need to validate generated values for environment: $(HELMFILE_ENV)"
278281

279282

280283
.PHONY: check-kubectl-context
@@ -299,9 +302,12 @@ check-kubectl-context: check-kubectl ## Verify kubectl context matches HELMFILE_
299302
exit 1; \
300303
fi \
301304
;; \
305+
oci) \
306+
echo "OK: connected to OCI/OKE cluster (context: $$CONTEXT)"; \
307+
;; \
302308
*) \
303309
echo "ERROR: invalid HELMFILE_ENV: $(HELMFILE_ENV)"; \
304-
echo " Valid values: gcp, e2e-gcp, kind, e2e-kind"; \
310+
echo " Valid values: gcp, e2e-gcp, kind, e2e-kind, oci"; \
305311
exit 1 \
306312
;; \
307313
esac \
@@ -372,7 +378,7 @@ help: ## Show this help message
372378
@echo ""
373379
@echo "Usage: make [target] [VARIABLE=value ...]"
374380
@echo ""
375-
@echo "Environment: HELMFILE_ENV=$(HELMFILE_ENV) (gcp|kind|e2e-gcp|e2e-kind)"
381+
@echo "Environment: HELMFILE_ENV=$(HELMFILE_ENV) (gcp|kind|e2e-gcp|e2e-kind|oci)"
376382
@echo ""
377383
@awk '/^# ====/ { \
378384
section = $$0; \
@@ -397,6 +403,16 @@ help: ## Show this help message
397403

398404

399405

406+
# ==== OCI/OKE Deployment Targets ====
407+
408+
.PHONY: install-all-oci
409+
install-all-oci: check-helmfile-env ## Full OCI/OKE install (rabbitmq + api + sentinel + adapter1 via helmfile)
410+
helmfile -f helmfile/helmfile.yaml.gotmpl -e $(HELMFILE_ENV) apply
411+
412+
.PHONY: uninstall-all-oci
413+
uninstall-all-oci: check-helmfile-env ## Uninstall all OCI components
414+
helmfile -f helmfile/helmfile.yaml.gotmpl -e $(HELMFILE_ENV) destroy
415+
400416
# ==== CI Targets ====
401417
# ci-dry-run: validation on terraform and helm plugins and maestro helm chart
402418
# ci-test: Run terraform install + maestro install + health check on maestro

env.oci

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# OCI/OKE Installation Configuration
2+
RABBITMQ_URL ?= "amqp://guest:guest@rabbitmq:5672"
3+
API_SERVICE_TYPE ?= ClusterIP
4+
API_BASE_URL ?= http://hyperfleet-api:8000
5+
6+
# Container Registry Configuration
7+
REGISTRY ?= quay.io
8+
API_REPOSITORY ?= openshift-hyperfleet/hyperfleet-api
9+
SENTINEL_REPOSITORY ?= openshift-hyperfleet/hyperfleet-sentinel
10+
ADAPTER_REPOSITORY ?= openshift-hyperfleet/hyperfleet-adapter
11+
12+
# Helm Charts
13+
CHART_ORG ?= openshift-hyperfleet
14+
API_CHART_REF ?= v0.3.0
15+
SENTINEL_CHART_REF ?= v0.3.0
16+
ADAPTER_CHART_REF ?= v0.3.0
17+
18+
# Image Tags
19+
API_IMAGE_TAG ?= v0.3.0
20+
SENTINEL_IMAGE_TAG ?= v0.3.0
21+
ADAPTER_IMAGE_TAG ?= v0.3.0
22+
IMAGE_PULL_POLICY ?= Always
23+
24+
# Kubernetes Namespaces
25+
NAMESPACE ?= hyperfleet
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# OCI/OKE overrides for Sentinel (v0.2.0 config format)
2+
# The v0.2.0 binary uses flat config (hyperfleetApi under config, not clients)
3+
4+
hyperfleet-sentinel:
5+
config:
6+
resourceType: clusters
7+
resourceSelector: []
8+
9+
hyperfleetApi:
10+
baseUrl: http://hyperfleet-api:8000
11+
timeout: 5s
12+
13+
broker:
14+
type: rabbitmq
15+
topic: hyperfleet-clusters
16+
rabbitmq:
17+
url: amqp://guest:guest@rabbitmq:5672/
18+
exchangeType: topic
19+
20+
monitoring:
21+
podMonitoring:
22+
enabled: false
23+
prometheusRule:
24+
enabled: false
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{{ $namespace := requiredEnv "NAMESPACE" }}
2+
adapters:
3+
- name: adapter1
4+
resourceType: clusters
5+
values:
6+
- adapterTaskConfig:
7+
create: true
8+
adapterConfig:
9+
create: true
10+
log:
11+
level: debug
12+
rbac:
13+
resources:
14+
- configmaps
15+
broker:
16+
create: true
17+
rabbitmq:
18+
url: "amqp://guest:guest@rabbitmq:5672"
19+
queue: {{ $namespace }}-clusters-adapter1
20+
exchange: {{ $namespace }}-clusters
21+
routingKey: "#"
22+
setFiles:
23+
- name: adapterConfig.yaml
24+
file: configs/base/adapters/adapter1/adapter-config.yaml
25+
- name: adapterTaskConfig.yaml
26+
file: configs/base/adapters/adapter1/adapter-task-config.yaml
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
sentinels:
2+
- name: clusters
3+
values:
4+
- config:
5+
resourceType: clusters

helmfile/helmfile.yaml.gotmpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ environments:
4848
serviceType: {{ env "API_SERVICE_TYPE" | default "LoadBalancer" }}
4949
- environments/gcp/adapter-configs.yaml.gotmpl
5050
- environments/gcp/sentinel-configs.yaml.gotmpl
51+
oci:
52+
values:
53+
- brokerType: rabbitmq
54+
serviceType: {{ env "API_SERVICE_TYPE" | default "ClusterIP" }}
55+
- environments/oci/adapter-configs.yaml.gotmpl
56+
- environments/oci/sentinel-configs.yaml
5157

5258
commonLabels:
5359
group: hyperfleet

0 commit comments

Comments
 (0)