Open varac opened 6 years ago
Hi,
it was built for an older version of openshift (3.1 or 3.2 I think), so it might have issues talking to a more recent version.
I guess that the issue is related to the resources requested: the "everything" shortcut references https://github.com/vbehar/openshift-git/blob/master/pkg/openshift/kinds.go#L12 maybe some of those are not available anymore under the same group/version as what the client think.
you can try to run it for only a few resources (for example "pod"). maybe it fails for a resource that you don't care about..
@vbehar Thx for the quick answer!
these are the types that don't work with openshift 3.7: policyBindings, policies, clusterPolicyBindings, clusterPolicies
There are new types in openshift 3.7, it would be great to update the "everything" alias to reflect all types in 3.7. But I figured out how to work around this with explicitly passing all types, will paste my successful cmd here once I included all types.
ok great. feel free to submit a PR if you have the time ;-)
Ok, here we go:
These are services aliased by everything
without types not supported by os 3.7:
ns,pv,scc,users,groups,bc,dc,rc,pods,is,svc,routes,templates,secrets,limits,quota,pvc,sa
And these additional types work with os 3.7:
configmaps,endpoints,imagestreamtags,limitranges,projects,replicationcontrollers,resourcequotas,rolebindings,roles,services
I haven't written a line in go, plus a PR would need to check the os version before aliasing so sorry, I can't come up with a PR :(
So just for the record, to export all available resources in openshift 3.7 (no guarantee for completeness):
export TYPES='ns,pv,scc,users,groups,bc,dc,rc,pods,is,svc,routes,templates,secrets,limits,quota,pvc,sa,configmaps,endpoints,imagestreamtags,limitranges,projects,replicationcontrollers,resourcequotas,rolebindings,roles,services'
openshift-git export $TYPES --config=/home/varac/.kube/cad.admin.kubeconfig --all-namespaces --repository-path=/home/varac/cad/infrastructure/openshift/openshift-git
thanks. I'll add that to the README
Thanks for this awesome project! Unfortunatly it fails during export. It already commited 195 changes, but then breaks with this error:
Any chance to git that fixed ?
I'm using openshift 3.7.