Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for namespace search-attributes #604

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Dariusch
Copy link

@Dariusch Dariusch commented Nov 4, 2024

What was changed

I am adding support for adding search attributes while creating a namespace.

Why?

We recently migrated to the temporal chart and missed the option to include the previously used config.

Checklist

  1. How was this tested:

values:

server:
  config:
    namespaces:
      # Enable this to create namespaces
      create: true
      namespace:
        - name: default
          retention: 3d
          searchAttributes: []
        - name: non-default
          retention: 3d
          searchAttributes:
            - name: my_keyword
              type: Keyword
            - name: my_keyword2
              type: Keyword

output:

        - name: create-default-namespace
          image: "temporalio/admin-tools:1.25.1-tctl-1.18.1-cli-1.1.0"
          imagePullPolicy: IfNotPresent
          command: ['/bin/sh','-c']
          args: ['temporal operator namespace describe -n default || temporal operator namespace create -n default --retention 3d']
          env:
            - name: TEMPORAL_ADDRESS
              value: "release-name-temporal-frontend.rmt.svc:7233"
        - name: create-non-default-namespace
          image: "temporalio/admin-tools:1.25.1-tctl-1.18.1-cli-1.1.0"
          imagePullPolicy: IfNotPresent
          command: ['/bin/sh','-c']
          args: ['temporal operator namespace describe -n non-default || temporal operator namespace create -n non-default --retention 3d']
          env:
            - name: TEMPORAL_ADDRESS
              value: "release-name-temporal-frontend.rmt.svc:7233"
        - name: create-non-default-search-attributes
          image: "temporalio/admin-tools:1.25.1-tctl-1.18.1-cli-1.1.0"
          imagePullPolicy: IfNotPresent
          command: ['/bin/sh','-c']
          args: ['temporal operator search-attribute create --namespace non-default --name my_keyword --type Keyword --name my_keyword2 --type Keyword']
          env:
            - name: TEMPORAL_ADDRESS
              value: "release-name-temporal-frontend.rmt.svc:7233"
      containers:
        - name: done
          image: "temporalio/admin-tools:1.25.1-tctl-1.18.1-cli-1.1.0"
          imagePullPolicy: IfNotPresent
          command: ['sh', '-c', 'echo "Store setup completed"']
  1. Any docs updates needed?

No, its an optional opt-in.

@Dariusch Dariusch requested a review from a team as a code owner November 4, 2024 10:44
@CLAassistant
Copy link

CLAassistant commented Nov 4, 2024

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Contributor

@robholland robholland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Search attributes do not belong to namespaces on self-hosted Temporal.

I'm happy to include this feature, but it needs to be separated from any namespace related code.

@Dariusch
Copy link
Author

What do you mean?

Afaik according to the docs they are namespace scoped.

I would be happy to change the PR if you could point me in the right direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants