Skip to content

Commit

Permalink
Merge pull request #718 from alexandrevilain/feat/remove-workerprocess
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandrevilain authored Apr 29, 2024
2 parents 29e78a5 + df961c1 commit b818a69
Show file tree
Hide file tree
Showing 38 changed files with 33 additions and 3,343 deletions.
11 changes: 0 additions & 11 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ defaults:
env:
KIND_VERSION: v0.22.0
OPERATOR_IMAGE_PATH: /tmp/temporal-operator.tar
WORKER_PROCESS_IMAGE_PATH: /tmp/example-worker-process.tar

jobs:
run-e2e:
Expand Down Expand Up @@ -53,15 +52,6 @@ jobs:
cache-from: type=gha
cache-to: type=gha
outputs: type=docker,dest=${{ env.OPERATOR_IMAGE_PATH }}
- name: Build worker-process
uses: docker/build-push-action@v5
with:
context: ./examples/worker-process/helloworld
push: false
tags: example-worker-process:latest
cache-from: type=gha
cache-to: type=gha
outputs: type=docker,dest=${{ env.WORKER_PROCESS_IMAGE_PATH }}

- name: Install Kind
uses: helm/kind-action@v1
Expand All @@ -76,7 +66,6 @@ jobs:
run: make test-e2e
env:
OPERATOR_IMAGE_PATH: ${{ env.OPERATOR_IMAGE_PATH }}
WORKER_PROCESS_IMAGE_PATH: ${{ env.WORKER_PROCESS_IMAGE_PATH }}
KUBERNETES_VERSION: ${{ matrix.kube-version.tag }}
KIND_IMAGE: ${{ matrix.kube-version.kind-image }}

Expand Down
16 changes: 0 additions & 16 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:

env:
REGISTRY: ghcr.io
GO_VERSION: "1.21.5"

jobs:
release:
Expand Down Expand Up @@ -68,21 +67,6 @@ jobs:
push: true
tags: ${{ steps.metabundle.outputs.tags }}
labels: ${{ steps.metabundle.outputs.labels }}
- name: Docker meta example worker-process
id: workerprocess
uses: docker/metadata-action@v5
with:
images: |
${{ env.REGISTRY }}/alexandrevilain/example-worker-process
tags: |
type=ref,event=tag
- name: Build and push worker-process docker image
uses: docker/build-push-action@v5
with:
context: ./examples/worker-process/helloworld
push: true
tags: ${{ steps.workerprocess.outputs.tags }}
labels: ${{ steps.workerprocess.outputs.labels }}
- name: Release
uses: softprops/action-gh-release@v2
with:
Expand Down
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,7 @@ test-e2e: artifacts ## Run end2end tests.
test-e2e-dev: artifacts ## Run end2end tests on dev computer using kind.
docker build -t temporal-operator .
docker save temporal-operator > /tmp/temporal-operator.tar
docker build -t example-worker-process ./examples/worker-process/helloworld
docker save example-worker-process > /tmp/example-worker-process.tar
OPERATOR_IMAGE_PATH=/tmp/temporal-operator.tar WORKER_PROCESS_IMAGE_PATH=/tmp/example-worker-process.tar go test ./tests/e2e -v -timeout 60m -args "--v=4"
OPERATOR_IMAGE_PATH=/tmp/temporal-operator.tar go test ./tests/e2e -v -timeout 60m -args "--v=4"

.PHONY: ensure-license
ensure-license: go-licenser
Expand Down
45 changes: 0 additions & 45 deletions api/v1beta1/condition_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,48 +118,3 @@ func SetTemporalNamespaceReconcileError(n *TemporalNamespace, status metav1.Cond
}
apimeta.SetStatusCondition(&n.Status.Conditions, condition)
}

// GetTemporalWorkerProcessReadyCondition returns the ready condition for the provided worker process if found.
func GetTemporalWorkerProcessReadyCondition(w *TemporalWorkerProcess) (*metav1.Condition, bool) {
condition := apimeta.FindStatusCondition(w.Status.Conditions, ReadyCondition)
return condition, condition != nil
}

// SetTemporalWorkerProcessReady sets the ReadyCondition status for a temporal worker process.
func SetTemporalWorkerProcessReady(w *TemporalWorkerProcess, status metav1.ConditionStatus, reason, message string) {
condition := metav1.Condition{
Type: ReadyCondition,
LastTransitionTime: metav1.Now(),
ObservedGeneration: w.GetGeneration(),
Reason: reason,
Status: status,
Message: message,
}
apimeta.SetStatusCondition(&w.Status.Conditions, condition)
}

// SetTemporalWorkerProcessReconcileSuccess sets the ReconcileSuccessCondition status for a temporal worker process.
func SetTemporalWorkerProcessReconcileSuccess(w *TemporalWorkerProcess, status metav1.ConditionStatus, reason, message string) {
condition := metav1.Condition{
Type: ReconcileSuccessCondition,
LastTransitionTime: metav1.Now(),
ObservedGeneration: w.GetGeneration(),
Reason: reason,
Status: status,
Message: message,
}
apimeta.SetStatusCondition(&w.Status.Conditions, condition)
}

// SetTemporalWorkerProcessReconcileError sets the ReconcileErrorCondition status for a temporal worker process.
func SetTemporalWorkerProcessReconcileError(w *TemporalWorkerProcess, status metav1.ConditionStatus, reason, message string) {
condition := metav1.Condition{
Type: ReconcileErrorCondition,
LastTransitionTime: metav1.Now(),
ObservedGeneration: w.GetGeneration(),
Reason: reason,
Status: status,
Message: message,
}
apimeta.SetStatusCondition(&w.Status.Conditions, condition)
}
36 changes: 0 additions & 36 deletions api/v1beta1/temporalworkerprocess_defaults.go

This file was deleted.

185 changes: 0 additions & 185 deletions api/v1beta1/temporalworkerprocess_types.go

This file was deleted.

Loading

0 comments on commit b818a69

Please sign in to comment.