Skip to content

GDC-ConsumerEdge/flowise-ai-trait

Repository files navigation

Overview

This repostiory is used to add Flowise trait to a config-sync enabled GDC or GKE Cluster

How to use

Must apply the following config-management-system namespace (no async way to do this yet):

apiVersion: configsync.gke.io/v1beta1
kind: RootSync
metadata:
  name: flowise-trait-sync
  namespace: config-management-system
spec:
  sourceFormat: unstructured
  git:
    repo: "https://gitlab.com/gcp-solutions-public/retail-edge/available-cluster-traits/flowise-ai-trait.git"
    branch: "main"
    dir: "/config/gdc"
    auth: "token"  # OR "none" when using non-authenticated/public repo
    secretRef:
      name: flowise-git-creds                 # matches the ExternalSecret below (NOTE: Needs Google Secret Manager secret to match)

---

apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
  name: flowise-git-creds-es
  namespace: config-management-system
spec:
  refreshInterval: 24h
  secretStoreRef:
    kind: ClusterSecretStore
    name: gcp-secret-store
  target:                                       # K8s secret definition
    name: flowise-git-creds                     ############# Matches the secretRef above
    creationPolicy: Owner
  data:
  - secretKey: username                         # K8s secret key name inside secret
    remoteRef:
      key: flowise-git-creds                    #  GCP Secret Name
      property: username                        # field inside GCP Secret
  - secretKey: token                            # K8s secret key name inside secret
    remoteRef:
      key: flowise-git-creds                    #  GCP Secret Name
      property: token                           # field inside GCP Secret

Create GCP Secret

# One time only
gcloud secrets create flowise-git-creds --replication-policy="automatic"
export TOKEN="<token-name>"
export TOKEN_VALUE="<token-value>"
# this can be run multiple times, adds a new version each time
echo -n "{ \"username\":\"${TOKEN}\", \"token\":\"${TOKEN_VALUE}\" }" | gcloud secrets versions add flowise-git-creds --data-file=-

Local Validation

Assuming nomos is installed (via gcloud components install nomos)

nomos vet --no-api-server-check --path config/

Docker method

Using this link to find the version of nomos-docker: https://cloud.google.com/anthos-config-management/docs/how-to/updating-private-registry#expandable-1

docker pull gcr.io/config-management-release/nomos:stable
docker run -it -v $(pwd):/code/ gcr.io/config-management-release/nomos:stable nomos vet --no-api-server-check --path /code/config/

ConfigSync Overview

See our documentation for how to use each subdirectory.

About

No description or website provided.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages