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

Use ARM architecture to run Keycloak on OpenShift #908

Open
ahus1 opened this issue Jul 30, 2024 · 1 comment
Open

Use ARM architecture to run Keycloak on OpenShift #908

ahus1 opened this issue Jul 30, 2024 · 1 comment
Assignees

Comments

@ahus1
Copy link
Contributor

ahus1 commented Jul 30, 2024

Description

OpenShift with hosted control planes now supports ARM workers. Using such workers would be in-line with our company strategy.

Discussion

No response

Motivation

Save cloud costs both for us and our users

Details

No response

@ahus1
Copy link
Contributor Author

ahus1 commented Jul 30, 2024

The following worked succcessfully:

Create an ARM worker pool:

rosa create machinepool -c gh-keycloak-a --instance-type m6g.4xlarge --max-replicas 10 --min-replicas 1 --name scaling-arm --enable-autoscaling --autorepair

Add a scheduling to the keycloak.yaml to start Keycloak on the ARM workers:

  scheduling:
    affinity:
      nodeAffinity:
        requiredDuringSchedulingIgnoredDuringExecution:
          nodeSelectorTerms:
            - matchExpressions:
                - key: kubernetes.io/arch
                  operator: In
                  values:
                    - arm64
      podAffinity:
        preferredDuringSchedulingIgnoredDuringExecution:
          - weight: 10
            podAffinityTerm:
              labelSelector:
                matchLabels:
                  app: keycloak
                  app.kubernetes.io/component: server
                  app.kubernetes.io/instance: keycloak
                  app.kubernetes.io/managed-by: keycloak-operator
              topologyKey: topology.kubernetes.io/zone
      podAntiAffinity:
        preferredDuringSchedulingIgnoredDuringExecution:
          - weight: 50
            podAffinityTerm:
              labelSelector:
                matchLabels:
                  app: keycloak
                  app.kubernetes.io/component: server
                  app.kubernetes.io/instance: keycloak
                  app.kubernetes.io/managed-by: keycloak-operator
              topologyKey: kubernetes.io/hostname

I might have needed to kill a previously running pod. After that Keycloak started on the ARM pod.

Next steps:

  • See what happens if we only have ARM workers in our cluster. Which services start? Do we then still need the schedule settings for Keycloak?
  • We are building the image with the JDBC driver for AWS. How can we build such an image for ARM? Maybe adding a node selector for the build might be required to force the node - if source-to-image supports that.
      nodeSelector
        kubernetes.io/arch: arm64
    

@ahus1 ahus1 changed the title Use ARM architecture to run Keycloak Use ARM architecture to run Keycloak on OpenShift Jul 30, 2024
@kami619 kami619 self-assigned this Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants