-
Notifications
You must be signed in to change notification settings - Fork 71
71 lines (65 loc) · 2.25 KB
/
keycloak-create-deployment.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
name: Keycloak - Create deployment
on:
workflow_dispatch:
inputs:
clusterName:
description: 'Name of the cluster'
type: string
replicas:
description: 'Number of keycloak pods'
disableStickySessions:
description: 'Disable sticky sessions in OpenShift Route'
type: boolean
default: false
required: true
image:
description: 'Keycloak Image'
type: string
podMemoryRequests:
description: 'Keycloak pod memory requests (in MB)'
type: string
podMemoryLimit:
description: 'Keycloak pod memory limit (in MB)'
type: string
podCpuRequests:
description: 'Keycloak pod CPU requests'
type: string
podCpuLimit:
description: 'Keycloak pod CPU limit'
type: string
heapMaxSizeMB:
description: 'Keycloak server maximum Java heap size (in MB)'
type: string
env:
PROJECT_PREFIX: runner- # same as default
PROJECT: runner-keycloak
jobs:
prepare:
name: Create Keycloak deployment
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup ROSA CLI
uses: ./.github/actions/rosa-cli-setup
with:
aws-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-default-region: ${{ vars.AWS_DEFAULT_REGION }}
rosa-token: ${{ secrets.ROSA_TOKEN }}
- name: Login to OpenShift cluster
uses: ./.github/actions/oc-keycloak-login
with:
clusterName: ${{ inputs.clusterName || format('gh-{0}', github.repository_owner) }}
- name: Create Keycloak deployment
uses: ./.github/actions/keycloak-create-deployment
with:
projectPrefix: ${{ env.PROJECT_PREFIX }}
replicas: ${{ inputs.replicas }}
disableStickySessions: ${{ inputs.disableStickySessions }}
image: ${{ inputs.image }}
podMemoryRequests: ${{ inputs.podMemoryRequests }}
podMemoryLimit: ${{ inputs.podMemoryLimit }}
podCpuRequests: ${{ inputs.podCpuRequests }}
podCpuLimit: ${{ inputs.podCpuLimit }}
heapMaxSizeMB: ${{ inputs.heapMaxSizeMB }}