Skip to content

Commit

Permalink
fix: add operator configuring for crappy name inconsistency
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Butler <[email protected]>
  • Loading branch information
butler54 committed Jun 20, 2024
1 parent 676f507 commit a015ac6
Show file tree
Hide file tree
Showing 10 changed files with 162 additions and 5 deletions.
30 changes: 30 additions & 0 deletions charts/all/milvus-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
apiVersion: v2
name: milvus
description: A Helm chart deploying milvus via the operator

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.0.0"

# Get teh chart installed for the milvus operator
dependencies:
- name: milvus-operator
version: "0.9.16"
repository: "https://zilliztech.github.io/milvus-operator/"
8 changes: 8 additions & 0 deletions charts/all/milvus-operator/templates/cert-manager.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: operator.openshift.io/v1alpha1
kind: CertManager
metadata:
name: cluster
spec:
logLevel: Normal
operatorLogLevel: Normal
managementState: Managed
6 changes: 6 additions & 0 deletions charts/all/milvus-operator/templates/cm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: my-config-map
data:
hello: 'world'
34 changes: 34 additions & 0 deletions charts/all/milvus-operator/templates/milvus-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# apiVersion: milvus.io/v1beta1
# kind: Milvus
# metadata:
# name: milvus-test
# namespace: milvus
# labels:
# app: milvus
# spec:
# config:
# minio:
# # your bucket name
# bucketName: milvus
# # Optional, config the prefix of the bucket milvus will use
# rootPath: test-v1
# useSSL: true
# dependencies:
# storage:
# # enable external object storage
# external: true
# type: S3 # MinIO | S3
# # the endpoint of AWS S3
# endpoint: s3.openshift-storage.svc:443
# # the secret storing the access key and secret key
# secretRef: "milvus-obc-clean"
# etcd:
# inCluster:
# values:
# replicaCount: 3
# resources:
# limits:
# cpu: 1
# memory: 4Gi
# deletionPolicy: Delete
# pvcDeletion: true
18 changes: 18 additions & 0 deletions charts/all/milvus-operator/templates/milvus-eso.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
apiVersion: "external-secrets.io/v1beta1"
kind: ExternalSecret
metadata:
name: milvus-obc-eso
namespace: milvus
spec:
refreshInterval: 15s
secretStoreRef:
name: {{ .Values.secretStore.name }}
kind: {{ .Values.secretStore.kind }}
target:
name: milvus-obc-clean
template:
type: Opaque
dataFrom:
- extract:
key: 'secret/data/global/milvus-s3'
10 changes: 10 additions & 0 deletions charts/all/milvus-operator/templates/milvus-obc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: objectbucket.io/v1alpha1
kind: ObjectBucketClaim
metadata:
name: milvus-obc
namespace: milvus
spec:
bucketName: milvus
storageClassName: openshift-storage.noobaa.io
additionalConfig:
bucketclass: noobaa-default-bucket-class
14 changes: 14 additions & 0 deletions charts/all/milvus-operator/templates/operator-scc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

apiVersion: security.openshift.io/v1
kind: SecurityContextConstraints
metadata:
name: milvus-operator-scc
namespace:
runAsUser:
type: RunAsAny
seLinuxContext:
type: RunAsAny
fsGroup:
type: RunAsAny
users:
- system:serviceaccount:milvus-operator:milvus
26 changes: 26 additions & 0 deletions charts/all/milvus-operator/templates/push-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: external-secrets.io/v1alpha1
kind: PushSecret
metadata:
name: milvus-obc # Customisable
namespace: milvus
spec:
updatePolicy: Replace # Policy to overwrite existing secrets in the provider on sync
deletionPolicy: Delete # the provider' secret will be deleted if the PushSecret is deleted
refreshInterval: 10s # Refresh interval for which push secret will reconcile
secretStoreRefs: # A list of secret stores to push secrets to
- name: {{ .Values.secretStore.name }}
kind: {{ .Values.secretStore.kind }}
selector:
secret:
name: milvus-obc # Source Kubernetes secret to be pushed
data:
- match:
secretKey: AWS_ACCESS_KEY_ID # Source Kubernetes secret key to be pushed
remoteRef:
remoteKey: "global/milvus-s3" # Remote reference (where the secret is going to be pushed)
property: accesskey
- match:
secretKey: AWS_SECRET_ACCESS_KEY # Source Kubernetes secret key to be pushed
remoteRef:
remoteKey: "global/milvus-s3"
property: secretkey # Remote reference (where the secret is going to be pushed
11 changes: 11 additions & 0 deletions charts/all/milvus-operator/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@


milvus-operator:
# has to be overriden as there are implicit assumptions name and full name are the same.
fullnameOverride: "milvus-operator"



secretStore:
name: vault-backend
kind: ClusterSecretStore
10 changes: 5 additions & 5 deletions values-hub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@ clusterGroup:
project: hub
path: charts/all/gpu-operator

# milvus-operator:
# name: milvus-operator
# namespace: milvus-operator # Default to the milvus-operator namespace based on the upstream dependent chart
# project: hub
# path: charts/all/milvus-operator
milvus-operator:
name: milvus-operator
namespace: milvus-operator # Default to the milvus-operator namespace based on the upstream dependent chart
project: hub
path: charts/all/milvus-operator
# Example project
test-dsp-a:
name: test-dsp-a
Expand Down

0 comments on commit a015ac6

Please sign in to comment.