This template will take care of most of the things you need:
-
serviceaccount/agnosticv-operator
-
role.rbac.authorization.k8s.io/agnosticv-operator
-
rolebinding.rbac.authorization.k8s.io/agnosticv-operator
-
deployment.apps/agnosticv-operator
-
clusterrole.authorization.openshift.io/agnosticv-operator
-
clusterrolebinding.rbac.authorization.k8s.io/agnosticv-operator-clusterrolebinding
-
customresourcedefinition.apiextensions.k8s.io/agnosticvrepos.gpte.redhat.com
-
namespaces "agnosticv-operator"
Just run the following:
oc process -f https://raw.githubusercontent.com/redhat-gpte-devopsautomation/agnosticv-operator/master/deploy-template.yaml|oc create -f -
The agnosticv-operator is listening on several agnosticV repos. This is represented by the Custom Resource AgnosticVRepo
.
Here is an example for a private github repo.
apiVersion: gpte.redhat.com/v1
kind: AgnosticVRepo
metadata:
generation: 1
name: gpte-agnosticv
namespace: "agnosticv-operator"
selfLink: /apis/gpte.redhat.com/v1/namespaces/agnosticv-operator/agnosticvrepos/gpte-agnosticv
spec:
ref: master
sshKey: agnosticv-operator-sshkey
url: [email protected]:redhat-gpe/agnosticv.git
babylonAnarchyGovernorRepo: https://github.com/redhat-gpte-devopsautomation/babylon_anarchy_governor.git
babylonAnarchyGovernorVersion: master
oc create -f agnosticv-gpte-private-repo.yaml
If you repo is public, then you can use HTTP repo for spec.url
and you don’t need the following steps.
oc create secret generic -n agnosticv-operator agnosticv-operator-sshkey --from-file=id_rsa=/home/ec2-user/.ssh/id_rsa