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

Issue 54 elasticsearch #55

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions elastisearch-operator/base/elasticsearch-operatorgroup.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: openshift-operators-redhat
namespace: openshift-operators-redhat
spec: {}
4 changes: 2 additions & 2 deletions elastisearch-operator/base/elastisearch-subscription.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ metadata:
name: elasticsearch-operator
namespace: openshift-operators-redhat
spec:
channel: "4.5"
channel: "patch-me-in-overlay"
installPlanApproval: Automatic
name: elasticsearch-operator
source: redhat-operators
sourceNamespace: openshift-marketplace
sourceNamespace: openshift-marketplace
4 changes: 3 additions & 1 deletion elastisearch-operator/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ kind: Kustomization
namespace: openshift-operators-redhat

resources:
- elastisearch-subscription.yaml
- namespace.yaml
- elastisearch-subscription.yaml
- elasticsearch-operatorgroup.yaml
4 changes: 4 additions & 0 deletions elastisearch-operator/base/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: openshift-operators-redhat
65 changes: 0 additions & 65 deletions rhsso/rhsso-operator/base/approval-and-cert-job.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion rhsso/rhsso-operator/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ kind: Kustomization
resources:
- rhsso-operatorgroup.yaml
- rhsso-subscription.yaml
- approval-and-cert-job.yaml
- rhsso-operator-config-job.yaml
- serviceaccount.yaml
- rbac.yaml
31 changes: 2 additions & 29 deletions rhsso/rhsso-operator/base/rbac.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: installplan-approver
rules:
- apiGroups:
- operators.coreos.com
resources:
- installplans
- subscriptions
verbs:
- get
- list
- patch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand All @@ -29,19 +15,6 @@ rules:
- create
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: installplan-approvers
namespace: sso
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: installplan-approver
subjects:
- kind: ServiceAccount
name: rhsso-operator-job
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: rhsso-cert-secret-creators
Expand All @@ -52,5 +25,5 @@ roleRef:
name: rhsso-cert-secret-creator
subjects:
- kind: ServiceAccount
name: rhsso-operator-job
namespace: sso
name: rhsso-operator-config-job
namespace: sso
29 changes: 29 additions & 0 deletions rhsso/rhsso-operator/base/rhsso-operator-config-job.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiVersion: batch/v1
kind: Job
metadata:
name: rhsso-operator-config-job
spec:
template:
spec:
containers:
- image: registry.redhat.io/openshift4/ose-cli:v4.8
command:
- /bin/bash
- -c
- |
export HOME=/tmp/approver

echo "GENERATE_OPENID_CERT set to 'true'. Create a ConfigMap named openidcrt in the openshift-config project."

# Get name of certs secret. It can be router-certs or router-certs-default.
CERT_SECRET=$(oc get secrets -n openshift-ingress | grep 'router-certs\|ingress-certs\|-ingress' | cut -d ' ' -f1)

tlscert=`oc get secrets/$CERT_SECRET -o jsonpath={.data.'tls\.crt'} -n openshift-ingress | base64 --decode`
oc create configmap openidcacrt --from-literal ca.crt="$tlscert" -n openshift-config
imagePullPolicy: Always
name: installplan-approver-and-cert-secret
dnsPolicy: ClusterFirst
restartPolicy: OnFailure
serviceAccount: rhsso-operator-config-job
serviceAccountName: rhsso-operator-config-job
terminationGracePeriodSeconds: 30
5 changes: 1 addition & 4 deletions rhsso/rhsso-operator/base/rhsso-operatorgroup.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
annotations:
olm.providedAPIs: Keycloak.v1alpha1.keycloak.org,KeycloakBackup.v1alpha1.keycloak.org,KeycloakClient.v1alpha1.keycloak.org,KeycloakRealm.v1alpha1.keycloak.org,KeycloakUser.v1alpha1.keycloak.org
generateName: sso-
name: sso
spec:
targetNamespaces:
- sso
targetNamespaces: []

4 changes: 2 additions & 2 deletions rhsso/rhsso-operator/base/rhsso-subscription.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: rhsso-operator
spec:
channel: alpha
installPlanApproval: Manual
installPlanApproval: Automatic
name: rhsso-operator
source: redhat-operators
sourceNamespace: openshift-marketplace
sourceNamespace: openshift-marketplace
2 changes: 1 addition & 1 deletion rhsso/rhsso-operator/base/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: rhsso-operator-job
name: rhsso-operator-config-job