Skip to content

Commit

Permalink
import realm file from url
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinblack committed Sep 6, 2023
1 parent 93df924 commit 1caa8ed
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion controllers/keycloak.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,18 @@ import (
)

func keycloakConfigMap(cr *hyperfoilv1alpha1.Horreum) *corev1.ConfigMap {
resp, err := http.Get("https://github.com/Hyperfoil/Horreum/blob/0.7.11/infra/keycloak-horreum.json")
req, err := http.NewRequest("GET", "https://github.com/Hyperfoil/Horreum/blob/0.7.11/infra/keycloak-horreum.json", nil)
if err != nil {
return nil
}

resp, err := http.DefaultClient.Do(req)
if err != nil {
return nil
}

defer resp.Body.Close()

horreumRealm, err := io.ReadAll(resp.Body)
if err != nil {
return nil
Expand Down

0 comments on commit 1caa8ed

Please sign in to comment.