-
Ensure the
KUBECONFIG
environment variable points to a management cluster with no HyperShift installed yet. -
Build HyperShift.
# requires go v1.16+ $ make build
-
Install HyperShift in development mode which causes the operator deployment to be deployment scaled to zero so that it doesn't conflict with your local operator process.
$ bin/hypershift install --development
-
Run the HyperShift operator locally.
$ bin/hypershift-operator run
-
Build and push a custom image build to your own repository.
make IMG=quay.io/my/hypershift:latest docker-build docker-push
-
Install HyperShift using the custom image:
$ bin/hypershift install --hypershift-image quay.io/my/hypershift:latest
-
(Optional) If your repository is private, create a secret:
oc create secret generic hypershift-operator-pull-secret -n hypershift --from-file=.dockerconfig=/my/pull-secret --type=kubernetes.io/dockerconfig
Then update the operator ServiceAccount in the hypershift namespace:
oc patch serviceaccount operator -n hypershift -p '{"imagePullSecrets": [{"name": "hypershift-operator-pull-secret"}]}'
-
Install HyperShift.
-
Run the tests.
$ make e2e $ bin/test-e2e -test.v -test.timeout 0 \ --e2e.aws-credentials-file /my/aws-credentials \ --e2e.pull-secret-file /my/pull-secret \ --e2e.base-domain my-basedomain
On MacOS, get a nice PDF of the graph:
brew install graphviz
go get golang.org/x/exp/cmd/modgraphviz
go mod graph | modgraphviz | dot -T pdf | open -a Preview.app -f
After making changes to types in the api
package, make sure to update the
associated CRD files:
$ make api
To update third-party API types (e.g. sigs.k8s.io/cluster-api
), edit the dependency
version in go.mod
and then update the contents of vendor
:
$ go mod vendor
Then update the associated CRD files:
$ make api