Skip to content

Commit

Permalink
Restructure manifests and add release manifests
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Mohr <[email protected]>
  • Loading branch information
rmohr committed Dec 4, 2017
1 parent a6e0fe3 commit 93a8bc2
Show file tree
Hide file tree
Showing 21 changed files with 429 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ cmd/virt-api/virt-api*
cmd/virtctl/virtctl*
cmd/virt-dhcp/virt-dhcp*
tools/openapispec/openapispec
manifests/*.yaml
manifests/**/*.yaml
**/bin
bin/*
.vagrant
Expand Down
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ script:
-service=travis-ci -package=./pkg/... -ignore=$(find -name generated_mock*.go -printf
"%P\n" | paste -d, -s) ; else make test; fi
- make apidocs
- make manifests

cache:
directories:
Expand All @@ -71,6 +72,8 @@ deploy:
file_glob: true
file:
- cmd/virtctl/virtctl-*
- manifests/release/kubevirt.yaml
- manifests/release/spice-proxy.yaml
on:
tags: true
repo: kubevirt/kubevirt
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ clean:
rm tools/openapispec/openapispec -rf

distclean: clean
find manifests -name "*.yaml" -type f -delete
rm -rf vendor/
rm -f manifest/*.yaml
rm -f .glide.*.hash
glide cc

Expand Down
19 changes: 8 additions & 11 deletions cluster/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,30 +50,27 @@ EOF

echo "Cleaning up ..."
# Work around https://github.com/kubernetes/kubernetes/issues/33517
$KUBECTL delete -f manifests/virt-handler.yaml --cascade=false --grace-period 0 2>/dev/null || :
$KUBECTL delete -f manifests/dev/virt-handler.yaml --cascade=false --grace-period 0 2>/dev/null || :
$KUBECTL delete pods -n kube-system -l=daemon=virt-handler --force --grace-period 0 2>/dev/null || :

$KUBECTL delete -f manifests/libvirt.yaml --cascade=false --grace-period 0 2>/dev/null || :
$KUBECTL delete -f manifests/dev/libvirt.yaml --cascade=false --grace-period 0 2>/dev/null || :
$KUBECTL delete pods -n kube-system -l=daemon=libvirt --force --grace-period 0 2>/dev/null || :

# Make sure that the vms CRD is deleted, we use virtualmachines now
$KUBECTL delete customresourcedefinitions vms.kubevirt.io || :

# Remove all external facing services
externalServiceManifests | cluster/kubectl.sh --core delete -f - || :
externalServiceManifests | $KUBECTL delete -f - || :

# Delete everything else
for i in `ls manifests/*.yaml`; do
$KUBECTL delete -f $i --grace-period 0 2>/dev/null || :
done
# Delete everything, no matter if release, devel or infra
$KUBECTL delete -f manifests -R --grace-period 0 2>/dev/null || :

sleep 2

echo "Deploying ..."
externalServiceManifests | cluster/kubectl.sh --core apply -f -
externalServiceManifests | $KUBECTL apply -f -

for i in `ls manifests/*.yaml`; do
$KUBECTL create -f $i
done
$KUBECTL create -f manifests/dev -R $i
$KUBECTL create -f manifests/testing -R $i

echo "Done"
4 changes: 2 additions & 2 deletions hack/build-manifests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ set -e
source hack/config.sh

if [ $# -eq 0 ]; then
args=$manifest_templates
args=$(find manifests -type f -name "*.yaml.in")
else
args=$@
fi

# Delete all generated manifests in case an input file was deleted or renamed
rm -f "manifests/*.yaml"
find manifests -name "*.yaml" -type f -delete

# Render kubernetes manifests
for arg in $args; do
Expand Down
1 change: 0 additions & 1 deletion hack/config-default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ docker_images="cmd/virt-controller cmd/virt-launcher cmd/virt-handler cmd/virt-a
optional_docker_images="cmd/registry-disk-v1alpha images/fedora-atomic-registry-disk-demo"
docker_prefix=kubevirt
docker_tag=${DOCKER_TAG:-latest}
manifest_templates="`ls ${KUBEVIRT_PATH}manifests/*.in`"
master_ip=192.168.200.2
master_port=8184
network_provider=weave
5 changes: 5 additions & 0 deletions manifests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Manifests

* `dev` folder contains manifests for development
* `testing` folder contains manifests for testing purposes
* `release` folder contains manifests which are intended for users
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 93a8bc2

Please sign in to comment.