provider-temporal

module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 28, 2023 License: Apache-2.0

README

Temporal Provider

Provider Temporal is a Crossplane provider. It was build based on the Crossplane Template. It is used to manage and configure Temporal. It uses the Temporal Go SDK

How to use

Provider Credentials:

{
  "HostPort": "temporal:7233"
}

Example:

apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
  name: provider-temporal
spec:
  package: <packagepath>:<packagelabel>
  packagePullPolicy: IfNotPresent
  revisionActivationPolicy: Automatic
---
apiVersion: v1
kind: Secret
metadata:
  name: provider-temporal-config-creds
  namespace: crossplane-system
type: Opaque
stringData:
  credentials: |
    {
      "HostPort": "temporal:7233"
    }
---
apiVersion: temporal.crossplane.io/v1alpha1
kind: ProviderConfig
metadata:
  name: provider-temporal-config
spec: 
  credentials:
    source: Secret
    secretRef:
      namespace: crossplane-system
      name: provider-temporal-config-creds
      key: credentials  

Covered Managed Resources

Currently covered Managed Resources

TemporalNamespace

A Namespace is a unit of isolation within the Temporal Platform

temporal docs

temporal cli

Example:

apiVersion: core.temporal.crossplane.io/v1alpha1
kind: TemporalNamespace
metadata:
  name: ns1
spec:
  forProvider:
    name: "Test 1"
    description: "Desc 1"
    ownerEmail: "Test@test.local"
    workflowExecutionRetentionDays: 30
    data:
      - key1: value1
      - key2: value2
    historyArchivalState: "Disabled"
    historyArchivalUri: ""
    visibilityArchivalState: "Disabled"
    visibilityArchivalUri: ""
  providerConfigRef:
    name: provider-temporal-config

Developing

  1. Add new type by running the following command:
  export provider_name=temporal
  export group=core # lower case e.g. core, cache, database, storage, etc.
  export type=MyType # Camel casee.g. Bucket, Database, CacheCluster, etc.
  make provider.addtype provider=${provider_name} group=${group} kind=${type}
  1. Replace the core group with your new group in apis/{provider}.go

  2. Replace the MyType type with your new type in internal/controller/{provider}.go

  3. Run make reviewable to run code generation, linters, and tests.

  4. Run make build to build the provider.

Refer to Crossplane's CONTRIBUTING.md file for more information on how the Crossplane community prefers to work. The Provider Development guide may also be of use.

Directories

Path Synopsis
Package apis contains Kubernetes API for the temporal provider.
Package apis contains Kubernetes API for the temporal provider.
core
Package core contains group core API versions
Package core contains group core API versions
core/v1alpha1
Package v1alpha1 contains the v1alpha1 group Sample resources of the temporal provider.
Package v1alpha1 contains the v1alpha1 group Sample resources of the temporal provider.
v1alpha1
Package v1alpha1 contains the core resources of the temporal provider.
Package v1alpha1 contains the core resources of the temporal provider.
cmd
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL