-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move deployment configuration templates to be in files (#709)
**What this PR does / why we need it**: **Which issue(s) this PR fixes**: Fixes # **Does this PR introduce a user-facing change?**: <!-- If no, just write "NONE" in the release-note block below. --> ```release-note NONE ``` /cc @nakabonne This PR was merged by Kapetanios.
- Loading branch information
Showing
6 changed files
with
82 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
pkg/app/api/api/deploymentconfigtemplates/KubernetesBlueGreen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Deploy progressively with bluegreen stragegy. | ||
apiVersion: pipecd.dev/v1beta1 | ||
kind: KubernetesApp | ||
spec: | ||
pipeline: | ||
stages: | ||
# Deploy the workloads of CANARY variant. In this case, the number of | ||
# workload replicas of CANARY variant is the same with PRIMARY variant. | ||
- name: K8S_CANARY_ROLLOUT | ||
with: | ||
replicas: 100% | ||
|
||
# The percentage of traffic each variant should receive. | ||
# In this case, CANARY variant will receive all of the traffic. | ||
- name: K8S_TRAFFIC_ROUTING | ||
with: | ||
all: canary | ||
|
||
# Wait a manual approval from a developer on web. | ||
- name: WAIT_APPROVAL | ||
|
||
# Update the workload of PRIMARY variant to the new version. | ||
- name: K8S_PRIMARY_ROLLOUT | ||
|
||
# The percentage of traffic each variant should receive. | ||
# In this case, PRIMARY variant will receive all of the traffic. | ||
- name: K8S_TRAFFIC_ROUTING | ||
with: | ||
primary: 100 | ||
|
||
# Destroy all workloads of CANARY variant. | ||
- name: K8S_CANARY_CLEAN |
20 changes: 20 additions & 0 deletions
20
pkg/app/api/api/deploymentconfigtemplates/KubernetesCanary
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Deploy progressively with canary stragegy. | ||
apiVersion: pipecd.dev/v1beta1 | ||
kind: KubernetesApp | ||
spec: | ||
pipeline: | ||
stages: | ||
# Deploy the workloads of CANARY variant. In this case, the number of | ||
# workload replicas of CANARY variant is 10% of the replicas number of PRIMARY variant. | ||
- name: K8S_CANARY_ROLLOUT | ||
with: | ||
replicas: 10% | ||
|
||
# Wait a manual approval from a developer on web. | ||
- name: WAIT_APPROVAL | ||
|
||
# Update the workload of PRIMARY variant to the new version. | ||
- name: K8S_PRIMARY_ROLLOUT | ||
|
||
# Destroy all workloads of CANARY variant. | ||
- name: K8S_CANARY_CLEAN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Deploy plain-yaml manifests placing in the application configuration directory without specifying pipeline. | ||
apiVersion: pipecd.dev/v1beta1 | ||
kind: KubernetesApp | ||
spec: |