Skip to content

Commit

Permalink
fix: keycloak probes failure and intermittent perforamance issues (#1007
Browse files Browse the repository at this point in the history
)

* fix: keycloak probes failure results in pod crash

Signed-off-by: iam-veeramalla <abhishek.veeramalla@gmail.com>

* fix: use latest keycloak image to handle performance issue

Signed-off-by: iam-veeramalla <abhishek.veeramalla@gmail.com>

---------

Signed-off-by: iam-veeramalla <abhishek.veeramalla@gmail.com>
  • Loading branch information
iam-veeramalla committed Sep 26, 2023
1 parent aa6ab4e commit 75d6cf4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions common/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ const (
ArgoCDKeycloakImageForOpenShift = "registry.redhat.io/rh-sso-7/sso76-openshift-rhel8"

// ArgoCDKeycloakVersionForOpenShift is the default Keycloak version used for the OpenShift platform when not specified.
// Version: 7.6-25
ArgoCDKeycloakVersionForOpenShift = "sha256:bb6dc12a49370ba6baa40cfa064238cddcfd1edb22c37dcdf53d331c0f7ee15d"
// Version: 7.6-32
ArgoCDKeycloakVersionForOpenShift = "sha256:ec9f60018694dcc5d431ba47d5536b761b71cb3f66684978fe6bb74c157679ac"

// ArgoCDDefaultOIDCConfig is the default OIDC configuration.
ArgoCDDefaultOIDCConfig = ""
Expand Down
7 changes: 4 additions & 3 deletions controllers/argocd/keycloak.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ func getKeycloakContainer(cr *argoproj.ArgoCD) corev1.Container {
Image: getKeycloakContainerImage(cr),
ImagePullPolicy: "Always",
LivenessProbe: &corev1.Probe{
TimeoutSeconds: 120,
TimeoutSeconds: 240,
ProbeHandler: corev1.ProbeHandler{
Exec: &corev1.ExecAction{
Command: []string{
Expand All @@ -292,7 +292,7 @@ func getKeycloakContainer(cr *argoproj.ArgoCD) corev1.Container {
},
},
},
InitialDelaySeconds: 60,
InitialDelaySeconds: 120,
},
Name: "${APPLICATION_NAME}",
Ports: []corev1.ContainerPort{
Expand All @@ -302,7 +302,8 @@ func getKeycloakContainer(cr *argoproj.ArgoCD) corev1.Container {
{ContainerPort: 8888, Name: "ping", Protocol: "TCP"},
},
ReadinessProbe: &corev1.Probe{
TimeoutSeconds: 120,
TimeoutSeconds: 240,
InitialDelaySeconds: 120,
ProbeHandler: corev1.ProbeHandler{
Exec: &corev1.ExecAction{
Command: []string{
Expand Down
4 changes: 2 additions & 2 deletions controllers/argocd/keycloak_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func TestKeycloakContainerImage(t *testing.T) {
}),
updateCrFunc: nil,
templateAPIFound: true,
wantContainerImage: "registry.redhat.io/rh-sso-7/sso76-openshift-rhel8@sha256:bb6dc12a49370ba6baa40cfa064238cddcfd1edb22c37dcdf53d331c0f7ee15d",
wantContainerImage: "registry.redhat.io/rh-sso-7/sso76-openshift-rhel8@sha256:ec9f60018694dcc5d431ba47d5536b761b71cb3f66684978fe6bb74c157679ac",
},
{
name: "ArgoCDKeycloakImageEnvName env var set",
Expand Down Expand Up @@ -249,7 +249,7 @@ func TestNewKeycloakTemplate_testKeycloakContainer(t *testing.T) {
}
kc := getKeycloakContainer(a)
assert.Equal(t,
"registry.redhat.io/rh-sso-7/sso76-openshift-rhel8@sha256:bb6dc12a49370ba6baa40cfa064238cddcfd1edb22c37dcdf53d331c0f7ee15d", kc.Image)
"registry.redhat.io/rh-sso-7/sso76-openshift-rhel8@sha256:ec9f60018694dcc5d431ba47d5536b761b71cb3f66684978fe6bb74c157679ac", kc.Image)
assert.Equal(t, corev1.PullAlways, kc.ImagePullPolicy)
assert.Equal(t, "${APPLICATION_NAME}", kc.Name)
}
Expand Down
2 changes: 1 addition & 1 deletion tests/ocp/1-001_validate_rhsso/01-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
name: keycloak
spec:
containers:
- image: registry.redhat.io/rh-sso-7/sso76-openshift-rhel8@sha256:bb6dc12a49370ba6baa40cfa064238cddcfd1edb22c37dcdf53d331c0f7ee15d
- image: registry.redhat.io/rh-sso-7/sso76-openshift-rhel8@sha256:ec9f60018694dcc5d431ba47d5536b761b71cb3f66684978fe6bb74c157679ac
resources:
limits:
cpu: "1"
Expand Down

0 comments on commit 75d6cf4

Please sign in to comment.