mirror of
https://github.com/fluxcd/flagger.git
synced 2026-04-15 06:57:34 +00:00
Merge pull request #1254 from aryan9600/verify-crds
Add target and script to keep crds in sync
This commit is contained in:
@@ -35,6 +35,8 @@ jobs:
|
|||||||
go install golang.org/x/tools/cmd/goimports
|
go install golang.org/x/tools/cmd/goimports
|
||||||
- name: Run linters
|
- name: Run linters
|
||||||
run: make test-fmt test-codegen
|
run: make test-fmt test-codegen
|
||||||
|
- name: Verify CRDs
|
||||||
|
run: make verify-crd
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: go test -race -coverprofile=coverage.txt -covermode=atomic $(go list ./pkg/...)
|
run: go test -race -coverprofile=coverage.txt -covermode=atomic $(go list ./pkg/...)
|
||||||
- name: Check if working tree is dirty
|
- name: Check if working tree is dirty
|
||||||
|
|||||||
@@ -33,6 +33,9 @@ crd:
|
|||||||
cat artifacts/flagger/crd.yaml > charts/flagger/crds/crd.yaml
|
cat artifacts/flagger/crd.yaml > charts/flagger/crds/crd.yaml
|
||||||
cat artifacts/flagger/crd.yaml > kustomize/base/flagger/crd.yaml
|
cat artifacts/flagger/crd.yaml > kustomize/base/flagger/crd.yaml
|
||||||
|
|
||||||
|
verify-crd:
|
||||||
|
./hack/verify-crd.sh
|
||||||
|
|
||||||
version-set:
|
version-set:
|
||||||
@next="$(TAG)" && \
|
@next="$(TAG)" && \
|
||||||
current="$(VERSION)" && \
|
current="$(VERSION)" && \
|
||||||
|
|||||||
@@ -1040,20 +1040,20 @@ spec:
|
|||||||
- Failed
|
- Failed
|
||||||
- Terminating
|
- Terminating
|
||||||
- Terminated
|
- Terminated
|
||||||
|
failedChecks:
|
||||||
|
description: Failed check count of the current canary analysis
|
||||||
|
type: number
|
||||||
|
canaryWeight:
|
||||||
|
description: Traffic weight routed to canary
|
||||||
|
type: number
|
||||||
|
iterations:
|
||||||
|
description: Iteration count of the current canary analysis
|
||||||
|
type: number
|
||||||
trackedConfigs:
|
trackedConfigs:
|
||||||
description: TrackedConfig of this canary
|
description: TrackedConfig of this canary
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
canaryWeight:
|
|
||||||
description: Traffic weight routed to canary
|
|
||||||
type: number
|
|
||||||
failedChecks:
|
|
||||||
description: Failed check count of the current canary analysis
|
|
||||||
type: number
|
|
||||||
iterations:
|
|
||||||
description: Iteration count of the current canary analysis
|
|
||||||
type: number
|
|
||||||
lastAppliedSpec:
|
lastAppliedSpec:
|
||||||
description: LastAppliedSpec of this canary
|
description: LastAppliedSpec of this canary
|
||||||
type: string
|
type: string
|
||||||
|
|||||||
@@ -163,6 +163,9 @@ spec:
|
|||||||
portName:
|
portName:
|
||||||
description: Container port name
|
description: Container port name
|
||||||
type: string
|
type: string
|
||||||
|
appProtocol:
|
||||||
|
description: Application protocol of the port
|
||||||
|
type: string
|
||||||
targetPort:
|
targetPort:
|
||||||
description: Container target port name
|
description: Container target port name
|
||||||
x-kubernetes-int-or-string: true
|
x-kubernetes-int-or-string: true
|
||||||
@@ -1037,20 +1040,20 @@ spec:
|
|||||||
- Failed
|
- Failed
|
||||||
- Terminating
|
- Terminating
|
||||||
- Terminated
|
- Terminated
|
||||||
|
failedChecks:
|
||||||
|
description: Failed check count of the current canary analysis
|
||||||
|
type: number
|
||||||
|
canaryWeight:
|
||||||
|
description: Traffic weight routed to canary
|
||||||
|
type: number
|
||||||
|
iterations:
|
||||||
|
description: Iteration count of the current canary analysis
|
||||||
|
type: number
|
||||||
trackedConfigs:
|
trackedConfigs:
|
||||||
description: TrackedConfig of this canary
|
description: TrackedConfig of this canary
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
canaryWeight:
|
|
||||||
description: Traffic weight routed to canary
|
|
||||||
type: number
|
|
||||||
failedChecks:
|
|
||||||
description: Failed check count of the current canary analysis
|
|
||||||
type: number
|
|
||||||
iterations:
|
|
||||||
description: Iteration count of the current canary analysis
|
|
||||||
type: number
|
|
||||||
lastAppliedSpec:
|
lastAppliedSpec:
|
||||||
description: LastAppliedSpec of this canary
|
description: LastAppliedSpec of this canary
|
||||||
type: string
|
type: string
|
||||||
|
|||||||
Executable
+19
@@ -0,0 +1,19 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
REPO_ROOT=$(git rev-parse --show-toplevel)
|
||||||
|
|
||||||
|
d=$(diff ${REPO_ROOT}/artifacts/flagger/crd.yaml ${REPO_ROOT}/charts/flagger/crds/crd.yaml)
|
||||||
|
if [[ "$d" != "" ]]; then
|
||||||
|
echo "⨯ ${REPO_ROOT}/artifacts/flagger/crd.yaml and ${REPO_ROOT}/charts/flagger/crds/crd.yaml don't match"
|
||||||
|
echo "$d"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
d=$(diff ${REPO_ROOT}/artifacts/flagger/crd.yaml ${REPO_ROOT}/kustomize/base/flagger/crd.yaml)
|
||||||
|
if [[ "$d" != "" ]]; then
|
||||||
|
echo "⨯ ${REPO_ROOT}/artifacts/flagger/crd.yaml and ${REPO_ROOT}/kustomize/base/flagger/crd.yaml don't match"
|
||||||
|
echo "$d"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "✔ CRDs verified"
|
||||||
@@ -163,6 +163,9 @@ spec:
|
|||||||
portName:
|
portName:
|
||||||
description: Container port name
|
description: Container port name
|
||||||
type: string
|
type: string
|
||||||
|
appProtocol:
|
||||||
|
description: Application protocol of the port
|
||||||
|
type: string
|
||||||
targetPort:
|
targetPort:
|
||||||
description: Container target port name
|
description: Container target port name
|
||||||
x-kubernetes-int-or-string: true
|
x-kubernetes-int-or-string: true
|
||||||
@@ -1037,26 +1040,26 @@ spec:
|
|||||||
- Failed
|
- Failed
|
||||||
- Terminating
|
- Terminating
|
||||||
- Terminated
|
- Terminated
|
||||||
|
failedChecks:
|
||||||
|
description: Failed check count of the current canary analysis
|
||||||
|
type: number
|
||||||
|
canaryWeight:
|
||||||
|
description: Traffic weight routed to canary
|
||||||
|
type: number
|
||||||
|
iterations:
|
||||||
|
description: Iteration count of the current canary analysis
|
||||||
|
type: number
|
||||||
trackedConfigs:
|
trackedConfigs:
|
||||||
description: TrackedConfig of this canary
|
description: TrackedConfig of this canary
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
canaryWeight:
|
|
||||||
description: Traffic weight routed to canary
|
|
||||||
type: number
|
|
||||||
failedChecks:
|
|
||||||
description: Failed check count of the current canary analysis
|
|
||||||
type: number
|
|
||||||
iterations:
|
|
||||||
description: Iteration count of the current canary analysis
|
|
||||||
type: number
|
|
||||||
lastPromotedSpec:
|
|
||||||
description: LastPromotedSpec of this canary
|
|
||||||
type: string
|
|
||||||
lastAppliedSpec:
|
lastAppliedSpec:
|
||||||
description: LastAppliedSpec of this canary
|
description: LastAppliedSpec of this canary
|
||||||
type: string
|
type: string
|
||||||
|
lastPromotedSpec:
|
||||||
|
description: LastPromotedSpec of this canary
|
||||||
|
type: string
|
||||||
lastTransitionTime:
|
lastTransitionTime:
|
||||||
description: LastTransitionTime of this canary
|
description: LastTransitionTime of this canary
|
||||||
format: date-time
|
format: date-time
|
||||||
|
|||||||
Reference in New Issue
Block a user