redhat-cop / anarchy Goto Github PK
View Code? Open in Web Editor NEWAn operator for adding state for arbitrary api interactions
License: GNU General Public License v3.0
An operator for adding state for arbitrary api interactions
License: GNU General Public License v3.0
Currently this build uses centos image.
[root@bastion 0 ~/anarchy-operator master ⭑|✚1]# ansible-playbook test/test-playbook.yaml
ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.
The error appears to have been in '/root/anarchy-operator/test/test-playbook.yaml': line 17, column 5, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
tasks:
- name: Get route for test api server
^ here
In order to integrate with project babylon we need to be able to call the same API endpoint with different parameters based on the action.
A nice to have feature would be to have a higher level operator that manages deployment of anarchy in namespaces. It would watch for the creation of AnarchyGovernors and deploy the anarchy operator into the namespace if it were found to not already be running there.
This higher level operator could also be responsible for automatically bumping versions of the anarchy-operator image.
The operator needs a test suite
[ec2-user@clientvm 0 ~/anarchy-operator master ⭑|✔]$
oc process -f deploy-template.yaml -p APP_DOMAIN=apps.cluster-babyprod.babyprod.babylon.open.redhat.com | oc apply -f -
error: unknown parameter name "APP_DOMAIN"
error: no objects passed to apply
Not working in shared cluster, not sure why....
The original design did not have a way to remove the finalizers directly from the governor. Now it can handle it and would be a better approach.
At present all parameters are always sent and format is always JSON.
Support release of Anarchy with OLM, will depend on #51
The AnarchyRunner definition should include the ability to pip install packages on the runner pods on start-up to support dependencies. This may be implemented as part of a general AnarchyRunner init structure.
Running instructions from the readme:
[root@bastion 1 ~/anarchy-operator master ⭑|✔]# oc process \
> -f deploy-template.yaml \
> -p OPERATOR_HOSTNAME=anarchy-operator.$INGRESS_DOMAIN \
> | oc apply -n anarchy-operator -f -
serviceaccount/anarchy-operator created
rolebinding.rbac.authorization.k8s.io/anarchy-operator created
deployment.apps/anarchy-operator created
service/anarchy-operator created
anarchyrunner.anarchy.gpte.redhat.com/default created
The Route "anarchy-operator" is invalid: spec.host: Invalid value: "anarchy-operator.": host must conform to DNS 952 subdomain conventions
Apparently the command:
INGRESS_DOMAIN=$(oc get ingresses.config.openshift.io cluster -o jsonpath='{.spec.domain}')
Doesn't work.
cluster is an OCP 3
Delete action should have a mechanism to complete before allowing delete of anarchysubject to complete
Depending on the resource you want to filter with label, you need to use either subject=...
or subject-name=...
Example:
oc get anarchyevents -l anarchy.gpte.redhat.com/subject-name=gpte.babylon-ocp4-workshop.dev-vzc5n
oc get anarchyactions -l anarchy.gpte.redhat.com/subject=gpte.babylon-ocp4-workshop.dev-vzc5n
I would expect the label name to be the consistent across Anarchy resources
Currently these can only be set on the governor
Events should allow for conditional handler firing based on object status.
Depends on #52
On occasions, after creating either an individual instance or a resourcepool no activity is seen on the Tower backends.
After
oc delete pod -l name=anarchy-runner -n anarchy-operator
The queue of anarchy events is released and API calls start again to Tower.
Step OpenShift) 5) after deploy-template.yml
[root@bastion 0 ~/anarchy-operator master ⭑|✔]# oc get pods
NAME READY STATUS RESTARTS AGE
anarchy-operator-8644944d68-dd9fx 1/1 Running 0 2m
anarchy-runner-default-58597877c6-dz575 0/1 ImagePullBackOff 0 6m
anarchy-runner-default-d96c5855b-r95kz 0/1 ImagePullBackOff 0 2m
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 1m default-scheduler Successfully assigned anarchy-operator/anarchy-runner-default-d96c5855b-r95kz to node1.babyworkshop.internal
Warning Failed 1m (x2 over 1m) kubelet, node1.babyworkshop.internal Error: ErrImagePull
Normal SandboxChanged 1m (x5 over 1m) kubelet, node1.babyworkshop.internal Pod sandbox changed, it will be killed and re-created.
Normal BackOff 1m (x6 over 1m) kubelet, node1.babyworkshop.internal Back-off pulling image "quay.io/gpte-devops-automation/anarchy-runner:0.3.4"
Warning Failed 1m (x6 over 1m) kubelet, node1.babyworkshop.internal Error: ImagePullBackOff
Normal Pulling 1m (x3 over 1m) kubelet, node1.babyworkshop.internal pulling image "quay.io/gpte-devops-automation/anarchy-runner:0.3.4"
Warning Failed 1m (x3 over 1m) kubelet, node1.babyworkshop.internal Failed to pull image "quay.io/gpte-devops-automation/anarchy-runner:0.3.4": rpc error: code = Unknown desc = Tag 0.3.4 not found in repository quay.io/gpte-devops-automation/anarchy-runner
Implement example of how to reschedule an action.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.