feat: add opik
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,7 +3,6 @@ node_modules/
|
||||
|
||||
# Ignore Helm chart default values files
|
||||
*-values.yaml
|
||||
values-*.yaml
|
||||
|
||||
# Env
|
||||
.env
|
||||
|
||||
82
src/_template/crd.mk
Normal file
82
src/_template/crd.mk
Normal file
@@ -0,0 +1,82 @@
|
||||
# CRD (Custom Resource Definition) Installation Template
|
||||
# This file provides common targets for installing CRDs before deploying Helm charts.
|
||||
#
|
||||
# Usage:
|
||||
# include ../_template/crd.mk
|
||||
#
|
||||
# Required variables:
|
||||
# HELM_RELEASE_NAME - The name of the Helm release
|
||||
# HELM_NAMESPACE - The namespace for the deployment
|
||||
# HELM_CHART_VERSION - The version of the Helm chart
|
||||
#
|
||||
# Optional variables:
|
||||
# CRD_HELM_CHART_REPO - The Helm chart repository for CRDs (if using Helm to install CRDs)
|
||||
# CRD_HELM_RELEASE_NAME - The release name for CRD installation (defaults to $(HELM_RELEASE_NAME)-crds)
|
||||
# CRD_HELM_NAMESPACE - The namespace for CRD installation (defaults to $(HELM_NAMESPACE))
|
||||
# CRD_KUBECTL_URLS - Space-separated list of URLs to apply via kubectl
|
||||
# CRD_INSTALL_GATEWAY_API - Set to "true" to install Gateway API CRDs
|
||||
# GATEWAY_API_VERSION - Version of Gateway API to install (defaults to v1.4.0)
|
||||
|
||||
CRD_HELM_RELEASE_NAME ?= $(HELM_RELEASE_NAME)-crds
|
||||
CRD_HELM_NAMESPACE ?= $(HELM_NAMESPACE)
|
||||
GATEWAY_API_VERSION ?= v1.4.0
|
||||
|
||||
# Install CRDs via kubectl apply
|
||||
.PHONY: install-crds-kubectl
|
||||
install-crds-kubectl:
|
||||
ifdef CRD_KUBECTL_URLS
|
||||
@echo "Installing CRDs from URLs..."
|
||||
@for url in $(CRD_KUBECTL_URLS); do \
|
||||
echo "Applying $$url..."; \
|
||||
kubectl apply -f $$url; \
|
||||
done
|
||||
else
|
||||
@echo "CRD_KUBECTL_URLS not set, skipping kubectl CRD installation."
|
||||
endif
|
||||
|
||||
# Install Gateway API CRDs
|
||||
.PHONY: install-crds-gateway-api
|
||||
install-crds-gateway-api:
|
||||
ifeq ($(CRD_INSTALL_GATEWAY_API),true)
|
||||
@echo "Installing Gateway API CRDs (version: $(GATEWAY_API_VERSION))..."
|
||||
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/$(GATEWAY_API_VERSION)/standard-install.yaml
|
||||
else
|
||||
@echo "CRD_INSTALL_GATEWAY_API not set to 'true', skipping Gateway API CRD installation."
|
||||
endif
|
||||
|
||||
# Install CRDs via Helm
|
||||
.PHONY: install-crds-helm
|
||||
install-crds-helm:
|
||||
ifdef CRD_HELM_CHART_REPO
|
||||
@echo "Installing CRDs via Helm..."
|
||||
helm upgrade -i --create-namespace \
|
||||
--namespace $(CRD_HELM_NAMESPACE) \
|
||||
$(if $(HELM_CHART_VERSION),--version $(HELM_CHART_VERSION),) \
|
||||
$(CRD_HELM_RELEASE_NAME) $(CRD_HELM_CHART_REPO)
|
||||
else
|
||||
@echo "CRD_HELM_CHART_REPO not set, skipping Helm CRD installation."
|
||||
endif
|
||||
|
||||
# Install all CRDs (kubectl + Gateway API + Helm)
|
||||
.PHONY: install-crds
|
||||
install-crds: install-crds-kubectl install-crds-gateway-api install-crds-helm
|
||||
@echo "All CRDs installed successfully."
|
||||
|
||||
# Install CRDs and then the main chart
|
||||
.PHONY: install-all
|
||||
install-all: install-crds install
|
||||
|
||||
# Verify CRD installation
|
||||
.PHONY: verify-crds
|
||||
verify-crds:
|
||||
ifdef CRD_KUBECTL_URLS
|
||||
@echo "Verifying CRDs..."
|
||||
@for url in $(CRD_KUBECTL_URLS); do \
|
||||
crd_name=$$(basename $$url | sed 's/\.yaml$$//'); \
|
||||
echo "Checking CRD: $$crd_name..."; \
|
||||
done
|
||||
endif
|
||||
ifeq ($(CRD_INSTALL_GATEWAY_API),true)
|
||||
@echo "Verifying Gateway API CRDs..."
|
||||
kubectl get crd | grep gateway.networking.k8s.io || echo "Gateway API CRDs not found"
|
||||
endif
|
||||
88
src/_template/gateway.mk
Normal file
88
src/_template/gateway.mk
Normal file
@@ -0,0 +1,88 @@
|
||||
# Gateway Service Installation Template
|
||||
# This file provides common targets for deploying Gateway API based services.
|
||||
# It extends crd.mk with Gateway-specific verification and utilities.
|
||||
#
|
||||
# Usage:
|
||||
# include ../_template/crd.mk
|
||||
# include ../_template/gateway.mk
|
||||
#
|
||||
# Required variables (inherited from crd.mk):
|
||||
# HELM_RELEASE_NAME - The name of the Helm release
|
||||
# HELM_NAMESPACE - The namespace for the deployment
|
||||
# HELM_CHART_VERSION - The version of the Helm chart
|
||||
#
|
||||
# Additional required variables:
|
||||
# GATEWAY_CLASS_NAME - The name of the GatewayClass (e.g., "kgateway", "agentgateway")
|
||||
# CRD_HELM_CHART_REPO - The Helm chart repository for CRDs
|
||||
#
|
||||
# Optional variables:
|
||||
# GATEWAY_API_VERSION - Version of Gateway API (defaults to v1.4.0)
|
||||
# ENABLE_GATEWAY_VERIFY - Set to "true" to enable gateway verification (defaults to true)
|
||||
|
||||
GATEWAY_API_VERSION ?= v1.4.0
|
||||
ENABLE_GATEWAY_VERIFY ?= true
|
||||
|
||||
# Verify GatewayClass installation
|
||||
.PHONY: verify-gatewayclass
|
||||
verify-gatewayclass:
|
||||
ifeq ($(ENABLE_GATEWAY_VERIFY),true)
|
||||
@echo "Verifying GatewayClass: $(GATEWAY_CLASS_NAME)..."
|
||||
kubectl get gatewayclass $(GATEWAY_CLASS_NAME) || echo "GatewayClass $(GATEWAY_CLASS_NAME) not found"
|
||||
else
|
||||
@echo "Gateway verification disabled."
|
||||
endif
|
||||
|
||||
# Verify Gateway installation
|
||||
.PHONY: verify-gateway
|
||||
verify-gateway:
|
||||
ifeq ($(ENABLE_GATEWAY_VERIFY),true)
|
||||
@echo "Verifying Gateways in namespace: $(HELM_NAMESPACE)..."
|
||||
kubectl get gateway -n $(HELM_NAMESPACE) 2>/dev/null || echo "No Gateways found in $(HELM_NAMESPACE)"
|
||||
else
|
||||
@echo "Gateway verification disabled."
|
||||
endif
|
||||
|
||||
# Verify HTTPRoutes
|
||||
.PHONY: verify-httproutes
|
||||
verify-httproutes:
|
||||
ifeq ($(ENABLE_GATEWAY_VERIFY),true)
|
||||
@echo "Verifying HTTPRoutes in namespace: $(HELM_NAMESPACE)..."
|
||||
kubectl get httproute -n $(HELM_NAMESPACE) 2>/dev/null || echo "No HTTPRoutes found in $(HELM_NAMESPACE)"
|
||||
else
|
||||
@echo "Gateway verification disabled."
|
||||
endif
|
||||
|
||||
# Full verification including Gateway API resources
|
||||
.PHONY: verify-gateway-all
|
||||
verify-gateway-all: verify-crds verify-gatewayclass verify-gateway verify-httproutes
|
||||
@echo "Gateway verification complete."
|
||||
|
||||
# Override the verify target from crd.mk to include gateway verification
|
||||
.PHONY: verify
|
||||
verify: verify-crds verify-gatewayclass
|
||||
ifeq ($(ENABLE_GATEWAY_VERIFY),true)
|
||||
@echo "Verifying $(HELM_APPLICATION_NAME) installation..."
|
||||
kubectl get pods -n $(HELM_NAMESPACE)
|
||||
kubectl get gatewayclass $(GATEWAY_CLASS_NAME) 2>/dev/null || echo "GatewayClass $(GATEWAY_CLASS_NAME) not ready yet"
|
||||
endif
|
||||
|
||||
# Port forward to the gateway service
|
||||
.PHONY: port-forward-gateway
|
||||
port-forward-gateway:
|
||||
@echo "Port forwarding to gateway service..."
|
||||
@POD_NAME=$$(kubectl get pods -n $(HELM_NAMESPACE) -l app=$(HELM_APPLICATION_NAME) -o jsonpath='{.items[0].metadata.name}' 2>/dev/null); \
|
||||
if [ -n "$$POD_NAME" ]; then \
|
||||
echo "Forwarding to pod: $$POD_NAME"; \
|
||||
kubectl port-forward -n $(HELM_NAMESPACE) $$POD_NAME 8080:8080; \
|
||||
else \
|
||||
echo "No gateway pod found with label app=$(HELM_APPLICATION_NAME)"; \
|
||||
fi
|
||||
|
||||
# Get gateway status
|
||||
.PHONY: gateway-status
|
||||
gateway-status:
|
||||
@echo "GatewayClass status:"
|
||||
kubectl get gatewayclass $(GATEWAY_CLASS_NAME) -o yaml 2>/dev/null || echo "GatewayClass not found"
|
||||
@echo ""
|
||||
@echo "Gateways in $(HELM_NAMESPACE):"
|
||||
kubectl get gateway -n $(HELM_NAMESPACE) -o yaml 2>/dev/null || echo "No Gateways found"
|
||||
100
src/_template/operator.mk
Normal file
100
src/_template/operator.mk
Normal file
@@ -0,0 +1,100 @@
|
||||
# Kubernetes Operator Installation Template
|
||||
# This file provides common targets for deploying services using the Operator pattern.
|
||||
#
|
||||
# Usage:
|
||||
# include ../_template/operator.mk
|
||||
#
|
||||
# Required variables:
|
||||
# HELM_RELEASE_NAME - The name of the Helm release
|
||||
# HELM_APPLICATION_NAME - The name of the application
|
||||
# HELM_NAMESPACE - The namespace for the deployment
|
||||
# HELM_CHART_REPO - The Helm chart repository
|
||||
#
|
||||
# Optional variables:
|
||||
# OPERATOR_RELEASE_NAME - The release name for the operator (defaults to $(HELM_RELEASE_NAME)-operator)
|
||||
# OPERATOR_NAMESPACE - The namespace for the operator (defaults to $(HELM_NAMESPACE)-system)
|
||||
# OPERATOR_CHART_REPO - The Helm chart repository for the operator (if different from main chart)
|
||||
# OPERATOR_CHART_VERSION - The version of the operator chart
|
||||
# OPERATOR_VALUES_FILE - The values file for the operator
|
||||
# CLUSTER_RELEASE_NAME - The release name for the cluster/resource
|
||||
# CLUSTER_VALUES_FILE - The values file for the cluster/resource
|
||||
# WAIT_FOR_CRD - Set to "true" to wait for CRDs to be ready
|
||||
# CRD_WAIT_TIMEOUT - Timeout for waiting for CRDs (defaults to 60s)
|
||||
|
||||
OPERATOR_RELEASE_NAME ?= $(HELM_RELEASE_NAME)-operator
|
||||
OPERATOR_NAMESPACE ?= $(HELM_NAMESPACE)-system
|
||||
CLUSTER_RELEASE_NAME ?= $(HELM_RELEASE_NAME)-cluster
|
||||
CRD_WAIT_TIMEOUT ?= 60s
|
||||
|
||||
# Install the operator
|
||||
.PHONY: install-operator
|
||||
install-operator:
|
||||
ifdef OPERATOR_CHART_REPO
|
||||
@echo "Installing operator: $(OPERATOR_RELEASE_NAME)..."
|
||||
helm upgrade $(OPERATOR_RELEASE_NAME) $(OPERATOR_CHART_REPO) \
|
||||
--install \
|
||||
--namespace $(OPERATOR_NAMESPACE) \
|
||||
--create-namespace \
|
||||
$(if $(OPERATOR_CHART_VERSION),--version $(OPERATOR_CHART_VERSION),) \
|
||||
$(if $(OPERATOR_VALUES_FILE),--values $(OPERATOR_VALUES_FILE),)
|
||||
else
|
||||
@echo "OPERATOR_CHART_REPO not set, skipping operator installation."
|
||||
endif
|
||||
|
||||
# Wait for CRDs to be ready
|
||||
.PHONY: wait-for-crds
|
||||
wait-for-crds:
|
||||
ifeq ($(WAIT_FOR_CRD),true)
|
||||
@echo "Waiting for CRDs to be ready (timeout: $(CRD_WAIT_TIMEOUT))..."
|
||||
@sleep 5
|
||||
@echo "CRDs should be ready now."
|
||||
else
|
||||
@echo "WAIT_FOR_CRD not set to 'true', skipping CRD wait."
|
||||
endif
|
||||
|
||||
# Install the cluster/resource using the operator
|
||||
.PHONY: install-cluster
|
||||
install-cluster:
|
||||
@echo "Installing cluster: $(CLUSTER_RELEASE_NAME)..."
|
||||
helm upgrade $(CLUSTER_RELEASE_NAME) $(HELM_CHART_REPO) \
|
||||
--install \
|
||||
--namespace $(HELM_NAMESPACE) \
|
||||
--create-namespace \
|
||||
$(if $(HELM_CHART_VERSION),--version $(HELM_CHART_VERSION),) \
|
||||
$(if $(CLUSTER_VALUES_FILE),--values $(CLUSTER_VALUES_FILE),$(if $(HELM_VALUES_FILE),--values $(HELM_VALUES_FILE),))
|
||||
|
||||
# Install operator and cluster
|
||||
.PHONY: install-all
|
||||
install-all: install-operator wait-for-crds install-cluster
|
||||
|
||||
# Uninstall the cluster only
|
||||
.PHONY: uninstall-cluster
|
||||
uninstall-cluster:
|
||||
helm uninstall $(CLUSTER_RELEASE_NAME) --namespace $(HELM_NAMESPACE)
|
||||
|
||||
# Uninstall the operator only
|
||||
.PHONY: uninstall-operator
|
||||
uninstall-operator:
|
||||
helm uninstall $(OPERATOR_RELEASE_NAME) --namespace $(OPERATOR_NAMESPACE)
|
||||
|
||||
# Uninstall everything
|
||||
.PHONY: uninstall-all
|
||||
uninstall-all: uninstall-cluster uninstall-operator
|
||||
|
||||
# Verify operator installation
|
||||
.PHONY: verify-operator
|
||||
verify-operator:
|
||||
@echo "Verifying operator installation..."
|
||||
kubectl get pods -n $(OPERATOR_NAMESPACE)
|
||||
kubectl get crd | grep $(HELM_APPLICATION_NAME) || echo "No CRDs found for $(HELM_APPLICATION_NAME)"
|
||||
|
||||
# Verify cluster installation
|
||||
.PHONY: verify-cluster
|
||||
verify-cluster:
|
||||
@echo "Verifying cluster installation..."
|
||||
kubectl get pods -n $(HELM_NAMESPACE)
|
||||
kubectl get $(HELM_APPLICATION_NAME) -n $(HELM_NAMESPACE) 2>/dev/null || echo "No $(HELM_APPLICATION_NAME) resources found"
|
||||
|
||||
# Verify everything
|
||||
.PHONY: verify
|
||||
verify: verify-operator verify-cluster
|
||||
@@ -10,23 +10,14 @@ HELM_OCI_USERNAME ?=
|
||||
HELM_OCI_PASSWORD ?=
|
||||
HELM_CHART_REPO ?= oci://$(HELM_OCI_REGISTRY)/$(HELM_OCI_NAMESPACE)/$(HELM_APPLICATION_NAME)
|
||||
|
||||
# CRD configuration
|
||||
CRD_INSTALL_GATEWAY_API = true
|
||||
CRD_HELM_CHART_REPO = oci://$(HELM_OCI_REGISTRY)/$(HELM_OCI_NAMESPACE)/agentgateway-crds
|
||||
CRD_HELM_RELEASE_NAME = agentgateway-crds
|
||||
|
||||
# Gateway configuration
|
||||
GATEWAY_CLASS_NAME = agentgateway
|
||||
|
||||
include ../_template/base.mk
|
||||
|
||||
.PHONY: install-crds
|
||||
install-crds:
|
||||
@echo "Installing Gateway API CRDs..."
|
||||
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.4.0/standard-install.yaml
|
||||
@echo "Installing agentgateway CRDs..."
|
||||
helm upgrade -i --create-namespace \
|
||||
--namespace $(HELM_NAMESPACE) \
|
||||
--version $(HELM_CHART_VERSION) \
|
||||
agentgateway-crds oci://$(HELM_OCI_REGISTRY)/$(HELM_OCI_NAMESPACE)/agentgateway-crds
|
||||
|
||||
.PHONY: install-all
|
||||
install-all: install-crds install
|
||||
|
||||
.PHONY: verify
|
||||
verify:
|
||||
@echo "Verifying agentgateway installation..."
|
||||
kubectl get pods -n $(HELM_NAMESPACE)
|
||||
kubectl get gatewayclass agentgateway
|
||||
include ../_template/crd.mk
|
||||
include ../_template/gateway.mk
|
||||
|
||||
@@ -8,8 +8,21 @@ HELM_OCI_REGISTRY ?=
|
||||
HELM_OCI_NAMESPACE ?=
|
||||
HELM_OCI_USERNAME ?=
|
||||
HELM_OCI_PASSWORD ?=
|
||||
HELM_REPO_NAME ?= k8ssandra
|
||||
HELM_REPO_URL ?= https://helm.k8ssandra.io/stable
|
||||
HELM_CHART_REPO ?= $(HELM_REPO_NAME)/k8ssandra-operator
|
||||
|
||||
# Operator configuration
|
||||
OPERATOR_RELEASE_NAME ?= k8ssandra-operator
|
||||
OPERATOR_NAMESPACE ?= k8ssandra-operator
|
||||
OPERATOR_CHART_REPO ?= k8ssandra/k8ssandra-operator
|
||||
OPERATOR_CHART_VERSION ?=
|
||||
OPERATOR_VALUES_FILE ?= ./values.yaml
|
||||
|
||||
# Cluster configuration
|
||||
CLUSTER_RELEASE_NAME ?= cassandra-cluster
|
||||
CLUSTER_CHART_REPO ?= k8ssandra/k8ssandra
|
||||
CLUSTER_VALUES_FILE ?= ./values-cluster.yaml
|
||||
|
||||
# Enable CRD waiting
|
||||
WAIT_FOR_CRD ?= true
|
||||
|
||||
include ../_template/base.mk
|
||||
include ../_template/operator.mk
|
||||
|
||||
41
src/cassandra/values-cluster.yaml
Normal file
41
src/cassandra/values-cluster.yaml
Normal file
@@ -0,0 +1,41 @@
|
||||
# K8ssandra Cluster Configuration
|
||||
# https://github.com/k8ssandra/k8ssandra-operator
|
||||
|
||||
# Cluster name
|
||||
cassandra:
|
||||
clusterName: cassandra-cluster
|
||||
datacenters:
|
||||
- name: dc1
|
||||
size: 3
|
||||
racks:
|
||||
- name: rack1
|
||||
- name: rack2
|
||||
- name: rack3
|
||||
storage:
|
||||
storageClassName: standard
|
||||
size: 10Gi
|
||||
resources:
|
||||
requests:
|
||||
cpu: 1000m
|
||||
memory: 4Gi
|
||||
limits:
|
||||
cpu: 2000m
|
||||
memory: 4Gi
|
||||
|
||||
# Stargate configuration
|
||||
stargate:
|
||||
enabled: false
|
||||
size: 1
|
||||
heapSize: 256Mi
|
||||
|
||||
# Reaper configuration
|
||||
reaper:
|
||||
enabled: false
|
||||
|
||||
# Medusa backup configuration
|
||||
medusa:
|
||||
enabled: false
|
||||
|
||||
# Prometheus monitoring
|
||||
monitoring:
|
||||
enabled: false
|
||||
@@ -8,8 +8,21 @@ HELM_OCI_REGISTRY ?=
|
||||
HELM_OCI_NAMESPACE ?=
|
||||
HELM_OCI_USERNAME ?=
|
||||
HELM_OCI_PASSWORD ?=
|
||||
HELM_REPO_NAME ?= flink-operator
|
||||
HELM_REPO_URL ?= https://downloads.apache.org/flink/flink-kubernetes-operator-1.9.0/
|
||||
HELM_CHART_REPO ?= $(HELM_REPO_NAME)/flink-operator
|
||||
|
||||
# Operator configuration
|
||||
OPERATOR_RELEASE_NAME ?= flink-operator
|
||||
OPERATOR_NAMESPACE ?= flink-operator
|
||||
OPERATOR_CHART_REPO ?= flink-operator/flink-operator
|
||||
OPERATOR_CHART_VERSION ?=
|
||||
OPERATOR_VALUES_FILE ?= ./values.yaml
|
||||
|
||||
# Cluster configuration (Flink uses FlinkDeployment CR, installed via kubectl or separate chart)
|
||||
CLUSTER_RELEASE_NAME ?= flink-cluster
|
||||
CLUSTER_CHART_REPO ?= flink-operator/flink-cluster
|
||||
CLUSTER_VALUES_FILE ?= ./values-cluster.yaml
|
||||
|
||||
# Enable CRD waiting
|
||||
WAIT_FOR_CRD ?= true
|
||||
|
||||
include ../_template/base.mk
|
||||
include ../_template/operator.mk
|
||||
|
||||
33
src/flink/values-cluster.yaml
Normal file
33
src/flink/values-cluster.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
# Flink Cluster Configuration (FlinkDeployment CR)
|
||||
# https://github.com/apache/flink-kubernetes-operator
|
||||
|
||||
# Flink cluster name
|
||||
nameOverride: flink-cluster
|
||||
|
||||
# Flink version
|
||||
flinkVersion: v1.19
|
||||
|
||||
# Job configuration
|
||||
job:
|
||||
jarURI: local:///opt/flink/examples/streaming/StateMachineExample.jar
|
||||
parallelism: 2
|
||||
upgradeMode: stateful
|
||||
state: running
|
||||
|
||||
# TaskManager configuration
|
||||
taskManager:
|
||||
resource:
|
||||
memory: 2048m
|
||||
cpu: 1
|
||||
replicas: 2
|
||||
|
||||
# JobManager configuration
|
||||
jobManager:
|
||||
resource:
|
||||
memory: 1024m
|
||||
cpu: 0.5
|
||||
replicas: 1
|
||||
|
||||
# Service configuration
|
||||
service:
|
||||
type: ClusterIP
|
||||
@@ -1,5 +1,5 @@
|
||||
HELM_RELEASE_NAME ?= strimzi-kafka-operator
|
||||
HELM_APPLICATION_NAME ?= strimzi-kafka-operator
|
||||
HELM_RELEASE_NAME ?= kafka
|
||||
HELM_APPLICATION_NAME ?= kafka
|
||||
HELM_NAMESPACE ?= kafka
|
||||
HELM_DIR ?= ./helm
|
||||
HELM_CHART_VERSION ?= 0.50.0
|
||||
@@ -8,6 +8,28 @@ HELM_OCI_REGISTRY ?= docker.io
|
||||
HELM_OCI_NAMESPACE ?=
|
||||
HELM_REPO_NAME ?= strimzi
|
||||
HELM_REPO_URL ?= https://strimzi.io/charts/
|
||||
HELM_CHART_REPO ?= $(HELM_REPO_NAME)/$(HELM_APPLICATION_NAME)
|
||||
|
||||
# Operator configuration (Strimzi only has operator, cluster is created via CRDs)
|
||||
OPERATOR_RELEASE_NAME ?= strimzi-kafka-operator
|
||||
OPERATOR_NAMESPACE ?= strimzi-operator
|
||||
OPERATOR_CHART_REPO ?= strimzi/strimzi-kafka-operator
|
||||
OPERATOR_CHART_VERSION ?= $(HELM_CHART_VERSION)
|
||||
OPERATOR_VALUES_FILE ?= ./values.yaml
|
||||
|
||||
# For Strimzi, we only install the operator
|
||||
# Kafka clusters are created using Kafka CRDs after operator is installed
|
||||
|
||||
include ../_template/base.mk
|
||||
include ../_template/operator.mk
|
||||
|
||||
# Override install target to only install operator
|
||||
.PHONY: install
|
||||
install: install-operator
|
||||
|
||||
# Override uninstall target to only uninstall operator
|
||||
.PHONY: uninstall
|
||||
uninstall: uninstall-operator
|
||||
|
||||
# Override verify target
|
||||
.PHONY: verify
|
||||
verify: verify-operator
|
||||
|
||||
@@ -10,23 +10,14 @@ HELM_OCI_USERNAME ?=
|
||||
HELM_OCI_PASSWORD ?=
|
||||
HELM_CHART_REPO ?= oci://$(HELM_OCI_REGISTRY)/$(HELM_OCI_NAMESPACE)/$(HELM_APPLICATION_NAME)
|
||||
|
||||
# CRD configuration
|
||||
CRD_INSTALL_GATEWAY_API = true
|
||||
CRD_HELM_CHART_REPO = oci://$(HELM_OCI_REGISTRY)/$(HELM_OCI_NAMESPACE)/kgateway-crds
|
||||
CRD_HELM_RELEASE_NAME = kgateway-crds
|
||||
|
||||
# Gateway configuration
|
||||
GATEWAY_CLASS_NAME = kgateway
|
||||
|
||||
include ../_template/base.mk
|
||||
|
||||
.PHONY: install-crds
|
||||
install-crds:
|
||||
@echo "Installing Kubernetes Gateway API CRDs..."
|
||||
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.4.0/standard-install.yaml
|
||||
@echo "Installing kgateway CRDs..."
|
||||
helm upgrade -i --create-namespace \
|
||||
--namespace $(HELM_NAMESPACE) \
|
||||
--version $(HELM_CHART_VERSION) \
|
||||
kgateway-crds oci://$(HELM_OCI_REGISTRY)/$(HELM_OCI_NAMESPACE)/kgateway-crds
|
||||
|
||||
.PHONY: install-all
|
||||
install-all: install-crds install
|
||||
|
||||
.PHONY: verify
|
||||
verify:
|
||||
@echo "Verifying kgateway installation..."
|
||||
kubectl get pods -n $(HELM_NAMESPACE)
|
||||
kubectl get gatewayclass kgateway
|
||||
include ../_template/crd.mk
|
||||
include ../_template/gateway.mk
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
HELM_RELEASE_NAME ?= mysql
|
||||
HELM_APPLICATION_NAME ?= mysql-innodbcluster
|
||||
HELM_APPLICATION_NAME ?= mysql
|
||||
HELM_NAMESPACE ?= mysql
|
||||
HELM_DIR ?= ./helm
|
||||
HELM_CHART_VERSION ?=
|
||||
@@ -8,8 +8,21 @@ HELM_OCI_REGISTRY ?=
|
||||
HELM_OCI_NAMESPACE ?=
|
||||
HELM_OCI_USERNAME ?=
|
||||
HELM_OCI_PASSWORD ?=
|
||||
HELM_REPO_NAME ?= mysql-operator
|
||||
HELM_REPO_URL ?= https://mysql.github.io/mysql-operator/
|
||||
HELM_CHART_REPO ?= $(HELM_REPO_NAME)/mysql-innodbcluster
|
||||
|
||||
# Operator configuration
|
||||
OPERATOR_RELEASE_NAME ?= mysql-operator
|
||||
OPERATOR_NAMESPACE ?= mysql-operator
|
||||
OPERATOR_CHART_REPO ?= mysql-operator/mysql-operator
|
||||
OPERATOR_CHART_VERSION ?=
|
||||
OPERATOR_VALUES_FILE ?=
|
||||
|
||||
# Cluster configuration
|
||||
CLUSTER_RELEASE_NAME ?= mysql-cluster
|
||||
CLUSTER_CHART_REPO ?= mysql-operator/mysql-innodbcluster
|
||||
CLUSTER_VALUES_FILE ?= ./values.yaml
|
||||
|
||||
# Enable CRD waiting
|
||||
WAIT_FOR_CRD ?= true
|
||||
|
||||
include ../_template/base.mk
|
||||
include ../_template/operator.mk
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
HELM_RELEASE_NAME ?= nebula
|
||||
HELM_APPLICATION_NAME ?= nebula-cluster
|
||||
HELM_APPLICATION_NAME ?= nebula
|
||||
HELM_NAMESPACE ?= nebula
|
||||
HELM_DIR ?= ./helm
|
||||
HELM_CHART_VERSION ?=
|
||||
@@ -8,8 +8,21 @@ HELM_OCI_REGISTRY ?=
|
||||
HELM_OCI_NAMESPACE ?=
|
||||
HELM_OCI_USERNAME ?=
|
||||
HELM_OCI_PASSWORD ?=
|
||||
HELM_REPO_NAME ?= nebula-operator
|
||||
HELM_REPO_URL ?= https://vesoft-inc.github.io/nebula-operator/charts
|
||||
HELM_CHART_REPO ?= $(HELM_REPO_NAME)/$(HELM_APPLICATION_NAME)
|
||||
|
||||
# Operator configuration
|
||||
OPERATOR_RELEASE_NAME ?= nebula-operator
|
||||
OPERATOR_NAMESPACE ?= nebula-operator-system
|
||||
OPERATOR_CHART_REPO ?= nebula-operator/nebula-operator
|
||||
OPERATOR_CHART_VERSION ?=
|
||||
OPERATOR_VALUES_FILE ?=
|
||||
|
||||
# Cluster configuration
|
||||
CLUSTER_RELEASE_NAME ?= nebula-cluster
|
||||
CLUSTER_CHART_REPO ?= nebula-operator/nebula-cluster
|
||||
CLUSTER_VALUES_FILE ?= ./values.yaml
|
||||
|
||||
# Enable CRD waiting
|
||||
WAIT_FOR_CRD ?= true
|
||||
|
||||
include ../_template/base.mk
|
||||
include ../_template/operator.mk
|
||||
|
||||
22
src/opik/Makefile
Normal file
22
src/opik/Makefile
Normal file
@@ -0,0 +1,22 @@
|
||||
HELM_RELEASE_NAME ?= opik
|
||||
HELM_APPLICATION_NAME ?= opik
|
||||
HELM_NAMESPACE ?= opik
|
||||
HELM_DIR ?= ./helm
|
||||
HELM_CHART_VERSION ?=
|
||||
HELM_VALUES_FILE ?= ./values.yaml
|
||||
HELM_OCI_REGISTRY ?=
|
||||
HELM_OCI_NAMESPACE ?=
|
||||
HELM_REPO_NAME ?= opik
|
||||
HELM_REPO_URL ?= https://comet-ml.github.io/opik
|
||||
HELM_CHART_REPO ?= $(HELM_REPO_NAME)/$(HELM_APPLICATION_NAME)
|
||||
|
||||
# Version for all Opik components
|
||||
VERSION ?= latest
|
||||
|
||||
HELM_INSTALL_ARGS ?= \
|
||||
--set component.backend.image.tag=$(VERSION) \
|
||||
--set component.python-backend.image.tag=$(VERSION) \
|
||||
--set component.python-backend.env.PYTHON_CODE_EXECUTOR_IMAGE_TAG="$(VERSION)" \
|
||||
--set component.frontend.image.tag=$(VERSION)
|
||||
|
||||
include ../_template/base.mk
|
||||
127
src/opik/README.md
Normal file
127
src/opik/README.md
Normal file
@@ -0,0 +1,127 @@
|
||||
# Opik
|
||||
|
||||
## Introduction
|
||||
|
||||
Opik is an open-source LLM evaluation framework by Comet that helps developers track, evaluate, and optimize their LLM applications. It provides comprehensive observability for LLM calls, prompt management, and evaluation metrics.
|
||||
|
||||
## Installation
|
||||
|
||||
To install Opik, run:
|
||||
|
||||
```bash
|
||||
make install
|
||||
```
|
||||
|
||||
By default, this will install the latest version of Opik. To install a specific version:
|
||||
|
||||
```bash
|
||||
VERSION=1.0.0 make install
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
After installation, verify the deployment:
|
||||
|
||||
```bash
|
||||
kubectl get pods -n opik
|
||||
```
|
||||
|
||||
To access Opik, port-forward the frontend service:
|
||||
|
||||
```bash
|
||||
kubectl port-forward svc/opik-frontend 5173:5173 -n opik
|
||||
```
|
||||
|
||||
Then access at <http://localhost:5173>
|
||||
|
||||
## Configuration
|
||||
|
||||
### Using External ClickHouse
|
||||
|
||||
To use an external ClickHouse installation instead of the built-in one:
|
||||
|
||||
```yaml
|
||||
component:
|
||||
backend:
|
||||
waitForClickhouse:
|
||||
clickhouse:
|
||||
host: your-clickhouse-host
|
||||
port: 8123
|
||||
protocol: http
|
||||
env:
|
||||
ANALYTICS_DB_MIGRATIONS_URL: 'jdbc:clickhouse://your-clickhouse-host:8123'
|
||||
ANALYTICS_DB_HOST: your-clickhouse-host
|
||||
ANALYTICS_DB_DATABASE_NAME: opik
|
||||
ANALYTICS_DB_MIGRATIONS_USER: opik
|
||||
ANALYTICS_DB_USERNAME: opik
|
||||
ANALYTICS_DB_MIGRATIONS_PASS: your-password
|
||||
ANALYTICS_DB_PASS: your-password
|
||||
|
||||
clickhouse:
|
||||
enabled: false
|
||||
```
|
||||
|
||||
### Configuring S3 Storage
|
||||
|
||||
To use AWS S3 for storage:
|
||||
|
||||
```yaml
|
||||
component:
|
||||
backend:
|
||||
env:
|
||||
S3_BUCKET: your-bucket-name
|
||||
S3_REGION: us-east-1
|
||||
AWS_ACCESS_KEY_ID: your-access-key
|
||||
AWS_SECRET_ACCESS_KEY: your-secret-key
|
||||
```
|
||||
|
||||
### Enabling Ingress
|
||||
|
||||
To expose Opik via Ingress:
|
||||
|
||||
```yaml
|
||||
component:
|
||||
frontend:
|
||||
ingress:
|
||||
enabled: true
|
||||
ingressClassName: nginx
|
||||
hosts:
|
||||
- host: opik.example.com
|
||||
paths:
|
||||
- path: /
|
||||
port: 5173
|
||||
pathType: Prefix
|
||||
```
|
||||
|
||||
## Uninstallation
|
||||
|
||||
Before uninstalling, remove the finalizer on the ClickHouse resource:
|
||||
|
||||
```bash
|
||||
kubectl patch -n opik chi opik-clickhouse --type json --patch='[ { "op": "remove", "path": "/metadata/finalizers" } ]'
|
||||
```
|
||||
|
||||
Then uninstall:
|
||||
|
||||
```bash
|
||||
make uninstall
|
||||
```
|
||||
|
||||
## Version Compatibility
|
||||
|
||||
Ensure your Python SDK version matches your Kubernetes deployment version:
|
||||
|
||||
```bash
|
||||
pip show opik
|
||||
```
|
||||
|
||||
To update the Python SDK:
|
||||
|
||||
```bash
|
||||
pip install --upgrade opik==<version>
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
- [Opik Documentation](https://www.comet.com/docs/opik/)
|
||||
- [Helm Chart Documentation](https://comet-ml.github.io/opik/)
|
||||
127
src/opik/README.zh.md
Normal file
127
src/opik/README.zh.md
Normal file
@@ -0,0 +1,127 @@
|
||||
# Opik
|
||||
|
||||
## 简介
|
||||
|
||||
Opik 是 Comet 开发的开源 LLM 评估框架,帮助开发者跟踪、评估和优化他们的 LLM 应用程序。它为 LLM 调用、提示管理和评估指标提供全面的可观测性。
|
||||
|
||||
## 安装
|
||||
|
||||
要安装 Opik,请运行:
|
||||
|
||||
```bash
|
||||
make install
|
||||
```
|
||||
|
||||
默认情况下,这将安装最新版本的 Opik。要安装特定版本:
|
||||
|
||||
```bash
|
||||
VERSION=1.0.0 make install
|
||||
```
|
||||
|
||||
## 使用
|
||||
|
||||
安装后,验证部署:
|
||||
|
||||
```bash
|
||||
kubectl get pods -n opik
|
||||
```
|
||||
|
||||
要访问 Opik,请端口转发前端服务:
|
||||
|
||||
```bash
|
||||
kubectl port-forward svc/opik-frontend 5173:5173 -n opik
|
||||
```
|
||||
|
||||
然后在 <http://localhost:5173> 访问
|
||||
|
||||
## 配置
|
||||
|
||||
### 使用外部 ClickHouse
|
||||
|
||||
要使用外部 ClickHouse 安装而不是内置的:
|
||||
|
||||
```yaml
|
||||
component:
|
||||
backend:
|
||||
waitForClickhouse:
|
||||
clickhouse:
|
||||
host: your-clickhouse-host
|
||||
port: 8123
|
||||
protocol: http
|
||||
env:
|
||||
ANALYTICS_DB_MIGRATIONS_URL: 'jdbc:clickhouse://your-clickhouse-host:8123'
|
||||
ANALYTICS_DB_HOST: your-clickhouse-host
|
||||
ANALYTICS_DB_DATABASE_NAME: opik
|
||||
ANALYTICS_DB_MIGRATIONS_USER: opik
|
||||
ANALYTICS_DB_USERNAME: opik
|
||||
ANALYTICS_DB_MIGRATIONS_PASS: your-password
|
||||
ANALYTICS_DB_PASS: your-password
|
||||
|
||||
clickhouse:
|
||||
enabled: false
|
||||
```
|
||||
|
||||
### 配置 S3 存储
|
||||
|
||||
要使用 AWS S3 进行存储:
|
||||
|
||||
```yaml
|
||||
component:
|
||||
backend:
|
||||
env:
|
||||
S3_BUCKET: your-bucket-name
|
||||
S3_REGION: us-east-1
|
||||
AWS_ACCESS_KEY_ID: your-access-key
|
||||
AWS_SECRET_ACCESS_KEY: your-secret-key
|
||||
```
|
||||
|
||||
### 启用 Ingress
|
||||
|
||||
要通过 Ingress 暴露 Opik:
|
||||
|
||||
```yaml
|
||||
component:
|
||||
frontend:
|
||||
ingress:
|
||||
enabled: true
|
||||
ingressClassName: nginx
|
||||
hosts:
|
||||
- host: opik.example.com
|
||||
paths:
|
||||
- path: /
|
||||
port: 5173
|
||||
pathType: Prefix
|
||||
```
|
||||
|
||||
## 卸载
|
||||
|
||||
在卸载之前,请移除 ClickHouse 资源上的 finalizer:
|
||||
|
||||
```bash
|
||||
kubectl patch -n opik chi opik-clickhouse --type json --patch='[ { "op": "remove", "path": "/metadata/finalizers" } ]'
|
||||
```
|
||||
|
||||
然后卸载:
|
||||
|
||||
```bash
|
||||
make uninstall
|
||||
```
|
||||
|
||||
## 版本兼容性
|
||||
|
||||
确保你的 Python SDK 版本与 Kubernetes 部署版本匹配:
|
||||
|
||||
```bash
|
||||
pip show opik
|
||||
```
|
||||
|
||||
要更新 Python SDK:
|
||||
|
||||
```bash
|
||||
pip install --upgrade opik==<version>
|
||||
```
|
||||
|
||||
## 文档
|
||||
|
||||
- [Opik 文档](https://www.comet.com/docs/opik/)
|
||||
- [Helm Chart 文档](https://comet-ml.github.io/opik/)
|
||||
50
src/opik/values.yaml
Normal file
50
src/opik/values.yaml
Normal file
@@ -0,0 +1,50 @@
|
||||
# Opik Helm Chart Values
|
||||
# Documentation: https://www.comet.com/docs/opik/self-host/kubernetes/
|
||||
|
||||
component:
|
||||
backend:
|
||||
image:
|
||||
tag: latest
|
||||
env:
|
||||
OPIK_USAGE_REPORT_ENABLED: 'false'
|
||||
# S3_BUCKET: ""
|
||||
# S3_REGION: ""
|
||||
# AWS_ACCESS_KEY_ID: ""
|
||||
# AWS_SECRET_ACCESS_KEY: ""
|
||||
|
||||
python-backend:
|
||||
image:
|
||||
tag: latest
|
||||
env:
|
||||
PYTHON_CODE_EXECUTOR_IMAGE_TAG: latest
|
||||
|
||||
frontend:
|
||||
image:
|
||||
tag: latest
|
||||
ingress:
|
||||
enabled: false
|
||||
# ingressClassName: nginx
|
||||
# annotations: {}
|
||||
# hosts:
|
||||
# - host: opik.example.com
|
||||
# paths:
|
||||
# - path: /
|
||||
# port: 5173
|
||||
# pathType: Prefix
|
||||
# tls:
|
||||
# enabled: true
|
||||
# hosts:
|
||||
# - opik.example.com
|
||||
# secretName: opik-tls
|
||||
|
||||
# ClickHouse configuration
|
||||
clickhouse:
|
||||
enabled: true
|
||||
# replicasCount: 1
|
||||
# service:
|
||||
# serviceTemplate: clickhouse-cluster-svc-lb-template
|
||||
# annotations: {}
|
||||
|
||||
# ZooKeeper configuration (required for ClickHouse replication)
|
||||
zookeeper:
|
||||
enabled: true
|
||||
@@ -1,8 +1,8 @@
|
||||
HELM_RELEASE_NAME ?= phoenix
|
||||
HELM_APPLICATION_NAME ?= phoenix
|
||||
HELM_APPLICATION_NAME ?= phoenix-helm
|
||||
HELM_NAMESPACE ?= phoenix
|
||||
HELM_DIR ?= ./helm
|
||||
HELM_CHART_VERSION ?= 4.0.37
|
||||
HELM_CHART_VERSION ?= 5.0.5
|
||||
HELM_VALUES_FILE ?= ./values.yaml
|
||||
HELM_OCI_REGISTRY ?= docker.io
|
||||
HELM_OCI_NAMESPACE ?= arizephoenix
|
||||
@@ -10,6 +10,6 @@ HELM_OCI_USERNAME ?=
|
||||
HELM_OCI_PASSWORD ?=
|
||||
HELM_REPO_NAME ?=
|
||||
HELM_REPO_URL ?=
|
||||
HELM_CHART_REPO ?= oci://$(HELM_OCI_REGISTRY)/$(HELM_OCI_NAMESPACE)/phoenix-helm
|
||||
HELM_CHART_REPO ?= oci://$(HELM_OCI_REGISTRY)/$(HELM_OCI_NAMESPACE)/$(HELM_APPLICATION_NAME)
|
||||
|
||||
include ../_template/base.mk
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
HELM_RELEASE_NAME ?= rabbitmq-cluster-operator
|
||||
HELM_APPLICATION_NAME ?= rabbitmq-cluster-operator
|
||||
HELM_NAMESPACE ?= rabbitmq-cluster-operator
|
||||
HELM_RELEASE_NAME ?= rabbitmq
|
||||
HELM_APPLICATION_NAME ?= rabbitmq
|
||||
HELM_NAMESPACE ?= rabbitmq
|
||||
HELM_DIR ?= ./helm
|
||||
HELM_CHART_VERSION ?= 0.2.0
|
||||
HELM_VALUES_FILE ?= ./values.yaml
|
||||
@@ -8,8 +8,28 @@ HELM_OCI_REGISTRY ?= docker.io
|
||||
HELM_OCI_NAMESPACE ?= cloudpirates
|
||||
HELM_OCI_USERNAME ?=
|
||||
HELM_OCI_PASSWORD ?=
|
||||
HELM_REPO_NAME ?=
|
||||
HELM_REPO_URL ?=
|
||||
HELM_CHART_REPO ?= oci://$(HELM_OCI_REGISTRY)/$(HELM_OCI_NAMESPACE)/$(HELM_APPLICATION_NAME)
|
||||
|
||||
# Operator configuration
|
||||
OPERATOR_RELEASE_NAME ?= rabbitmq-cluster-operator
|
||||
OPERATOR_NAMESPACE ?= rabbitmq-operator
|
||||
OPERATOR_CHART_REPO ?= oci://$(HELM_OCI_REGISTRY)/$(HELM_OCI_NAMESPACE)/rabbitmq-cluster-operator
|
||||
OPERATOR_CHART_VERSION ?= $(HELM_CHART_VERSION)
|
||||
OPERATOR_VALUES_FILE ?= ./values.yaml
|
||||
|
||||
# For RabbitMQ Cluster Operator, we only install the operator
|
||||
# RabbitMQ clusters are created using RabbitmqCluster CRDs after operator is installed
|
||||
|
||||
include ../_template/base.mk
|
||||
include ../_template/operator.mk
|
||||
|
||||
# Override install target to only install operator
|
||||
.PHONY: install
|
||||
install: install-operator
|
||||
|
||||
# Override uninstall target to only uninstall operator
|
||||
.PHONY: uninstall
|
||||
uninstall: uninstall-operator
|
||||
|
||||
# Override verify target
|
||||
.PHONY: verify
|
||||
verify: verify-operator
|
||||
|
||||
Reference in New Issue
Block a user