Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -362,3 +362,45 @@ tasks:
cmds:
- task: local-setup:iterate
vars: {FLAGS: "--cached --prerelease --concurrent"}
vars: {FLAGS: "--cached --latest --example-data"}

# Search-enabled local-setup tasks
local-setup:search:
cmds:
- task: local-setup
vars: {FLAGS: "--search"}

local-setup:search:iterate:
cmds:
- task: local-setup:iterate
vars: {FLAGS: "--search"}

local-setup:example-data:search:
cmds:
- task: local-setup
vars: {FLAGS: "--example-data --search"}

local-setup:example-data:search:iterate:
cmds:
- task: local-setup:iterate
vars: {FLAGS: "--example-data --search"}

local-setup:cached:search:
cmds:
- task: local-setup
vars: {FLAGS: "--cached --search"}

local-setup:cached:search:iterate:
cmds:
- task: local-setup:iterate
vars: {FLAGS: "--cached --search"}

local-setup:cached:example-data:search:
cmds:
- task: local-setup
vars: {FLAGS: "--cached --example-data --search"}

local-setup:cached:example-data:search:iterate:
cmds:
- task: local-setup:iterate
vars: {FLAGS: "--cached --example-data --search"}
49 changes: 49 additions & 0 deletions charts/platform-mesh-operator-components/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,16 @@ services:
operator:
shutdownTimeout: 1m
maxConcurrentReconciles: 1
search-operator:
enabled: false
values:
crds:
enabled: false
kubeconfigSecret: search-operator-kubeconfig
log:
level: debug
opensearch:
url: "http://opensearch.platform-mesh-system.svc.cluster.local:9200"
rebac-authz-webhook:
enabled: true
# -- Allow the configuration of additional ocm resources
Expand Down Expand Up @@ -342,6 +352,45 @@ services:
endpoint: observability-opentelemetry-collector.observability.svc.cluster.local:4317
tls:
enabled: false
opensearch:
enabled: false
helmRepo: true
helmRepoUrl: https://opensearch-project.github.io/helm-charts/
values:
# Single-node configuration suitable for development/small deployments
singleNode: true
replicas: 1
# Security disabled - enable and configure for production
config:
opensearch.yml: |
cluster.name: platform-mesh-search
network.host: 0.0.0.0
plugins.security.disabled: true
securityConfig:
enabled: false
# Resource configuration
resources:
requests:
cpu: 250m
memory: 512Mi
limits:
cpu: 1000m
memory: 1Gi
opensearchJavaOpts: "-Xms512m -Xmx512m"
# Persistence
persistence:
enabled: true
size: 8Gi
# Service
service:
type: ClusterIP
port: 9200
# Disable dashboards for MVP
dashboards:
enabled: false
# Sysctls for vm.max_map_count
sysctlInit:
enabled: true
portal:
enabled: false
# -- Allow the configuration of additional ocm resources
Expand Down
23 changes: 23 additions & 0 deletions charts/search-operator-crds/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
9 changes: 9 additions & 0 deletions charts/search-operator-crds/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v2
name: search-operator-crds
description: KCP APIResourceSchemas for the Search Operator

type: application

version: 0.1.0

appVersion: "0.1.0"
23 changes: 23 additions & 0 deletions charts/search-operator-crds/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# search-operator-crds

KCP APIResourceSchemas for the Search Operator

![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

## Description

This chart deploys the KCP APIResourceSchema for `SearchIndex` and extends the `core.platform-mesh.io` APIExport to include search functionality.

## Resources Created

- `APIResourceSchema` - Defines the SearchIndex resource schema for KCP
- `APIExport` - Extends the core.platform-mesh.io export with SearchIndex

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|

## Usage

This chart should be deployed to the KCP workspace where the search-operator runs, typically alongside other platform-mesh CRD charts.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: apis.kcp.io/v1alpha1
kind: APIExport
metadata:
creationTimestamp: null
name: core.platform-mesh.io
spec:
latestResourceSchemas:
- v260126-initial.searchindices.core.platform-mesh.io
status: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
apiVersion: apis.kcp.io/v1alpha1
kind: APIResourceSchema
metadata:
creationTimestamp: null
name: v260126-initial.searchindices.core.platform-mesh.io
spec:
group: core.platform-mesh.io
names:
kind: SearchIndex
listKind: SearchIndexList
plural: searchindices
singular: searchindex
scope: Cluster
versions:
- additionalPrinterColumns:
- jsonPath: .status.indexName
name: Index
type: string
- jsonPath: .status.documentCount
name: Documents
type: integer
- jsonPath: .status.conditions[?(@.type=="Ready")].status
name: Ready
type: string
name: v1alpha1
schema:
description: SearchIndex configures search indexing for a workspace
properties:
apiVersion:
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
description: Spec defines the desired state of SearchIndex
properties:
indexPrefix:
description: IndexPrefix is prepended to all index names for this workspace
pattern: ^[a-z][a-z0-9-]*$
type: string
paused:
description: Paused stops all indexing when true
type: boolean
trackedResources:
description: |-
TrackedResources lists which resource types to index
If empty, uses a default set of resources
items:
description: TrackedResource defines a resource type to index
properties:
group:
description: Group is the API group (empty string for core)
type: string
kind:
description: Kind is the resource kind
type: string
version:
description: Version is the API version
type: string
required:
- kind
- version
type: object
type: array
required:
- indexPrefix
type: object
status:
description: Status defines the observed state of SearchIndex
properties:
conditions:
description: Conditions represent the current state of the SearchIndex resource.
items:
description: Condition contains details for one aspect of the current state of this API Resource.
properties:
lastTransitionTime:
description: |-
lastTransitionTime is the last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
format: date-time
type: string
message:
description: |-
message is a human readable message indicating details about the transition.
This may be an empty string.
maxLength: 32768
type: string
observedGeneration:
description: |-
observedGeneration represents the .metadata.generation that the condition was set based upon.
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
with respect to the current state of the instance.
format: int64
minimum: 0
type: integer
reason:
description: |-
reason contains a programmatic identifier indicating the reason for the condition's last transition.
Producers of specific condition types may define expected values and meanings for this field,
and whether the values are considered a guaranteed API.
The value should be a CamelCase string.
This field may not be empty.
maxLength: 1024
minLength: 1
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
type: string
status:
description: status of the condition, one of True, False, Unknown.
enum:
- "True"
- "False"
- Unknown
type: string
type:
description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
required:
- lastTransitionTime
- message
- reason
- status
- type
type: object
type: array
documentCount:
description: DocumentCount is the number of documents indexed
format: int64
type: integer
indexName:
description: IndexName is the OpenSearch index name
type: string
lastSyncTime:
description: LastSyncTime is the last successful sync time
format: date-time
type: string
type: object
required:
- spec
type: object
served: true
storage: true
subresources:
status: {}
1 change: 1 addition & 0 deletions charts/search-operator-crds/test-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Place values here
7 changes: 7 additions & 0 deletions charts/search-operator-crds/tests/crds_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
suite: operator
values:
- ../test-values.yaml
tests:
- it: operator match the snapshot
asserts:
- matchSnapshot: {}
1 change: 1 addition & 0 deletions charts/search-operator-crds/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Place values here
23 changes: 23 additions & 0 deletions charts/search-operator/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
14 changes: 14 additions & 0 deletions charts/search-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v2
name: search-operator
description: A Helm chart for search-operator
type: application
version: 0.1.0
appVersion: "v0.1.0"
dependencies:
- name: search-operator-crds
version: 0.1.0
condition: crds.enabled
repository: oci://ghcr.io/platform-mesh/helm-charts
- name: common
version: 0.10.0
repository: oci://ghcr.io/platform-mesh/helm-charts
Loading
Loading