Add pgvector
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
apiVersion: postgresql.cnpg.io/v1
|
||||
kind: ImageCatalog
|
||||
metadata:
|
||||
name: pg-minimal-trixie
|
||||
namespace: cnpg-cluster
|
||||
spec:
|
||||
images:
|
||||
- image: ghcr.io/cloudnative-pg/postgresql:18.3-minimal-trixie
|
||||
major: 18
|
||||
@@ -6,6 +6,9 @@ metadata:
|
||||
spec:
|
||||
cluster:
|
||||
name: cnpg-cluster
|
||||
extensions:
|
||||
- ensure: present
|
||||
name: pgvector
|
||||
name: immich
|
||||
owner: immich
|
||||
status: {}
|
||||
|
||||
@@ -5,6 +5,5 @@ metadata:
|
||||
namespace: cnpg-cluster
|
||||
resources:
|
||||
- cluster-namespace.yaml
|
||||
- image-cataglog.yaml
|
||||
- immich-db.yaml
|
||||
- pg-cluster.yaml
|
||||
|
||||
@@ -8,15 +8,9 @@ import (
|
||||
kube_cnpg "danicos.dev/daniel/go-kube/pkg/cnpg"
|
||||
pg "github.com/cloudnative-pg/api/pkg/api/v1"
|
||||
core "k8s.io/api/core/v1"
|
||||
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
var cluster_meta = kube.NewMetadata(root.CloudNativePG+"-cluster", root.PGClusterNamespace)
|
||||
var image_catalog pg.ImageCatalog
|
||||
|
||||
func init() {
|
||||
image_catalog = ImageCatalog()
|
||||
}
|
||||
|
||||
func Stack() stack.Stack {
|
||||
kz := kube.NewKuztomizedStack(
|
||||
@@ -25,7 +19,6 @@ func Stack() stack.Stack {
|
||||
"cluster-namespace": root.PGClusterNamespace,
|
||||
"pg-cluster": Cluster(),
|
||||
"immich-db": ImmichDatabase(),
|
||||
"image-cataglog": image_catalog,
|
||||
},
|
||||
)
|
||||
return kz.Stack("postgres")
|
||||
@@ -68,32 +61,6 @@ func Cluster() pg.Cluster {
|
||||
return kube_cnpg.NewCluster(cluster_meta, spec)
|
||||
}
|
||||
|
||||
func ImageCatalog() pg.ImageCatalog {
|
||||
return pg.ImageCatalog{
|
||||
TypeMeta: meta.TypeMeta{
|
||||
Kind: "ImageCatalog",
|
||||
APIVersion: "postgresql.cnpg.io/v1",
|
||||
},
|
||||
ObjectMeta: kube.ObjectMeta(root.PG_VERSION_NAME, root.PGClusterNamespace.Name),
|
||||
Spec: pg.ImageCatalogSpec{
|
||||
Images: []pg.CatalogImage{
|
||||
{
|
||||
Major: root.PG_VERSION_18,
|
||||
Image: root.PG_VERSION_18_IMAGE,
|
||||
// Extensions: []pg.ExtensionConfiguration{
|
||||
// {
|
||||
// Name: "pgvector",
|
||||
// ImageVolumeSource: core.ImageVolumeSource{
|
||||
// Reference: "ghcr.io/cloudnative-pg/pgvector:0.8.2-18-trixie",
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
var ImmichPGSecret = kube_cnpg.NewPGSecret(root.Immich.Name, root.PGClusterNamespace)
|
||||
|
||||
func ImmichDatabase() pg.Database {
|
||||
@@ -105,12 +72,12 @@ func ImmichDatabase() pg.Database {
|
||||
Name: cluster_meta.Meta().Name,
|
||||
},
|
||||
Extensions: []pg.ExtensionSpec{
|
||||
// {
|
||||
// DatabaseObjectSpec: pg.DatabaseObjectSpec{
|
||||
// Name: "pgvector",
|
||||
// Ensure: pg.EnsurePresent,
|
||||
// },
|
||||
// },
|
||||
{
|
||||
DatabaseObjectSpec: pg.DatabaseObjectSpec{
|
||||
Name: "pgvector",
|
||||
Ensure: pg.EnsurePresent,
|
||||
},
|
||||
},
|
||||
// {
|
||||
// DatabaseObjectSpec: pg.DatabaseObjectSpec{
|
||||
// Name: "cube",
|
||||
|
||||
Reference in New Issue
Block a user