Skip to content

Commit

Permalink
feat: refactoring edgefarm.applications
Browse files Browse the repository at this point in the history
BREAKING CHANGE: for openyurt and new version of edgefarm.network
  • Loading branch information
siredmar committed Apr 28, 2023
1 parent e245798 commit 428776c
Show file tree
Hide file tree
Showing 106 changed files with 1,669 additions and 17,188 deletions.
59 changes: 23 additions & 36 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,53 +1,40 @@


all: render deploy ## renders and deploys all templates into the current k8s cluster

render: edge-worker-render cloud-worker-render app-network-render traits-render ## renders all templates
deploy: edge-worker-deploy cloud-worker-deploy app-network-deploy traits-deploy ## deploys all templates
render: traits-render components-render ## renders all templates
apply: traits-apply components-apply ## applies all templates
deploy: traits-deploy components-deploy ## deploys all templates

test: ## test example, e.g. `make test dev/manifests/applications/some-app.yaml`
@vela dry-run -f $(filter-out $@,$(MAKECMDGOALS))

traits-render:
@vela def vet ./cue/traits/volume-trait.cue
@vela def render ./cue/traits/volume-trait.cue -o manifests/vela-caps/traits/volume-trait.yaml

traits-deploy:
@vela def apply ./cue/traits/volume-trait.cue

edge-worker-render: ## renders the edge-worker crd
@vela def vet ./cue/components/edge-worker.cue
vela def render ./cue/components/edge-worker.cue -o manifests/vela-caps/components/edge-worker.yaml

edge-worker-deploy: ## deploys the edge-worker crd into the current k8s cluster
@vela def apply ./cue/components/edge-worker.cue
traits-render: ## renders all traits
@vela def vet cue/traits/edgefarm-network-trait.cue
@vela def render cue/traits/edgefarm-network-trait.cue -o manifests/vela-caps/traits/edgefarm-network-trait.yaml
@vela def vet cue/traits/edgefarm-storage-trait.cue
@vela def render cue/traits/edgefarm-storage-trait.cue -o manifests/vela-caps/traits/edgefarm-storage-trait.yaml

cloud-worker-render: ## renders the cloud-worker crd
@vela def vet ./cue/components/cloud-worker.cue
vela def render ./cue/components/cloud-worker.cue -o manifests/vela-caps/components/cloud-worker.yaml
traits-apply: ## applies all traits using vela cli
@vela def apply cue/traits/edgefarm-network-trait.cue
@vela def apply cue/traits/edgefarm-storage-trait.cue

cloud-worker-deploy: ## deploys the cloud-worker crd into the current k8s cluster
@vela def apply ./cue/components/cloud-worker.cue
traits-deploy: ## deploys all traits using kubectl
kubectl apply -n vela-system -f manifests/vela-caps/traits/edgefarm-network-trait.yaml
kubectl apply -n vela-system -f manifests/vela-caps/traits/edgefarm-storage-trait.yaml

app-network-render: ## renders the app-network crd
@vela def vet ./cue/components/application-network.cue
@vela def vet ./cue/traits/cloud-network-participant-trait.cue
@vela def vet ./cue/traits/edge-network-participant-trait.cue
vela def render cue/components/application-network.cue -o manifests/vela-caps/components/application-network.yaml
vela def render cue/traits/cloud-network-participant-trait.cue -o manifests/vela-caps/traits/cloud-network-participant-trait.yaml
vela def render cue/traits/edge-network-participant-trait.cue -o manifests/vela-caps/traits/edge-network-participant-trait.yaml
components-render: ## renders all components
@vela def vet cue/components/edgefarm-applications.cue
@vela def render cue/components/edgefarm-applications.cue -o manifests/vela-caps/components/edgefarm-applications.yaml
components-apply: ## applies all components using vela cli
@vela def apply cue/components/edgefarm-applications.cue
components-deploy: ## deploys all components using kubectl
kubectl apply -n vela-system -f manifests/vela-caps/components/edgefarm-applications.yaml

app-network-deploy: ## deploys the app-network crd into the current k8s cluster
@vela def apply ./cue/components/application-network.cue
@vela def apply ./cue/traits/cloud-network-participant-trait.cue
@vela def apply ./cue/traits/edge-network-participant-trait.cue

install-vela: ## install kubevela
@VELA_VERSION=v1.2.4
@VELA_VERSION=v1.8.0
@curl -fsSl https://kubevela.io/script/install.sh | bash -s ${VELA_VERSION}
@vela install

help: ## show help message
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make [target]\033[36m\033[0m\n"} /^[$$()% 0-9a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m\t %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

.PHONY: all test deploy edge-worker-render cloud-worker-render app-network-render edge-worker-deploy cloud-worker-deploy app-network-deploy install-vela help
.PHONY: all render apply deploy traits-render traits-apply traits-deploy components-render components-apply components-deploy install-vela help
91 changes: 0 additions & 91 deletions cue/components/application-network.cue

This file was deleted.

Loading

0 comments on commit 428776c

Please sign in to comment.