-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
99 lines (96 loc) · 3.2 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Weaviate Local K8s Action
description: Deploy Weaviate to a local Kubernetes cluster
inputs:
operation:
description: 'The operation to perform. Supported: setup, upgrade, clean. Default: setup'
required: false
default: 'setup'
weaviate-port:
description: 'The port number for Weaviate'
required: false
default: '8080'
weaviate-grpc-port:
description: 'The gRPC port number for Weaviate'
required: false
default: '50051'
workers:
description: 'The number of workers for Weaviate'
required: false
default: '3'
replicas:
description: 'The number of replicas for Weaviate'
required: false
default: '3'
weaviate-version:
description: 'The version of Weaviate to deploy'
required: false
default: 'latest'
helm-branch:
description: 'The branch of the Helm chart repository to use'
required: false
default: ''
modules:
description: 'Modules to load on Weaviate startup. Comma separated list of module names'
required: false
default: ''
values-override:
description: 'Override values for the Helm chart in YAML string'
required: false
default: ''
values-inline:
description: 'Override values for the Helm chart in inline form'
required: false
default: ''
enable-backup:
description: 'Configures S3 compatible backup for Weaviate'
required: false
default: 'false'
s3-offload:
description: 'Configures S3 tenant offloading'
required: false
default: 'false'
delete-sts:
description: 'Configure either Weaviate Statefulset should be removed'
required: false
default: 'false'
observability:
description: 'Enable observability stack'
required: false
default: 'false'
runs:
using: 'composite'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Create values-override.yaml
shell: bash
if: ${{ inputs.values-override != '' }}
run: |
echo "${{ inputs.values-override }}" > ${{ github.action_path }}/values-override.yaml
- name: Deploy local kubernetes cluster
shell: bash
env:
OPERATION: ${{ inputs.operation }}
WEAVIATE_PORT: ${{ inputs.weaviate-port }}
WEAVIATE_GRPC_PORT: ${{ inputs.weaviate-grpc-port }}
WORKERS: ${{ inputs.workers }}
REPLICAS: ${{ inputs.replicas }}
WEAVIATE_VERSION: ${{ inputs.weaviate-version }}
MODULES: ${{ inputs.modules }}
HELM_BRANCH: ${{ inputs.helm-branch }}
ENABLE_BACKUP: ${{ inputs.enable-backup }}
S3_OFFLOAD: ${{ inputs.s3-offload }}
DELETE_STS: ${{ inputs.delete-sts }}
VALUES_INLINE: ${{ inputs.values-inline }}
OBSERVABILITY: ${{ inputs.observability }}
run: ${{ github.action_path }}/local-k8s.sh $OPERATION
- name: Retrieve weaviate logs
shell: bash
if: failure()
run: |
echo "###### WEAVIATE LOGS ######"
kubectl logs -n weaviate -l app.kubernetes.io/name=weaviate || true
echo "####### WEAVIATE STS CONFIG ######"
kubectl get sts weaviate -n weaviate -o yaml || true
echo "####### KUBECTL-RELAY PROCESSES ######"
pgrep kubectl-relay || echo "No kubectl-relay processes found" || true