1
0
Fork 0
mirror of https://github.com/arangodb/kube-arangodb.git synced 2024-12-14 11:57:37 +00:00

[Maintenance] yamlfmt as CI Step (#1497)

This commit is contained in:
Adam Janikowski 2023-11-20 13:11:39 +01:00 committed by GitHub
parent 229d8651fb
commit ba64ce25c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 986 additions and 1819 deletions

View file

@ -49,31 +49,32 @@ jobs:
fi
make license-verify license-range-verify
- run: make fmt-verify
# - run: make linter
# - run:
# name: Unit tests
# command: |
# if [ -z "$CIRCLE_PULL_REQUEST" ]; then
# echo "This is not a pull request. Skipping..."
# exit 0
# fi
# make run-unit-tests
# - run:
# name: make bin
# command: |
# if [ -z "$CIRCLE_PULL_REQUEST" ]; then
# echo "This is not a pull request. Skipping..."
# exit 0
# fi
# make bin
# - run:
# name: vulncheck
# command: |
# if [ -z "$CIRCLE_PULL_REQUEST" ]; then
# echo "This is not a pull request. Skipping..."
# exit 0
# fi
# make vulncheck
- run: make yamlfmt-verify
- run: make linter
- run:
name: Unit tests
command: |
if [ -z "$CIRCLE_PULL_REQUEST" ]; then
echo "This is not a pull request. Skipping..."
exit 0
fi
make run-unit-tests
- run:
name: make bin
command: |
if [ -z "$CIRCLE_PULL_REQUEST" ]; then
echo "This is not a pull request. Skipping..."
exit 0
fi
make bin
- run:
name: vulncheck
command: |
if [ -z "$CIRCLE_PULL_REQUEST" ]; then
echo "This is not a pull request. Skipping..."
exit 0
fi
make vulncheck
- run:
name: Check that everything what should be generated is commited
command: |
@ -81,7 +82,7 @@ jobs:
echo "This is not a pull request. Skipping..."
exit 0
fi
make verify-generated synchronize-v2alpha1-with-v1 generate-internal fmt
make verify-generated synchronize-v2alpha1-with-v1 generate-internal fmt yamlfmt
if [ ! -z "$(git status --porcelain)" ]; then
echo "There are uncommited changes!"
git status

View file

@ -16,6 +16,7 @@
- (Feature) Add P0 Compare Func
- (Bugfix) Handle optional taints for Storage Operator
- (Bugfix) Fix Early Connections for 3.10+
- (Maintenance) yamlfmt as CI Step
## [1.2.35](https://github.com/arangodb/kube-arangodb/tree/1.2.35) (2023-11-06)
- (Maintenance) Update go-driver to v1.6.0, update IsNotFound() checks

View file

@ -275,8 +275,12 @@ fmt:
.PHONY: yamlfmt
yamlfmt:
@echo ">> Ensuring style of yaml files"
@$(foreach YAML,$(YAMLS),echo "yamlfmt $(YAML):" && $(GOPATH)/bin/yamlfmt -w $(YAML) || exit 1; )
@$(foreach YAML,$(YAMLS),echo "yamlfmt $(YAML):" && $(GOPATH)/bin/yamlfmt -w $(YAML) || exit 1; )
@$(GOPATH)/bin/yamlfmt -quiet $(YAMLS)
.PHONY: yamlfmt-verify
yamlfmt-verify:
@echo ">> Verifying style of yaml files"
@$(GOPATH)/bin/yamlfmt -lint -quiet $(YAMLS)
.PHONY: license
license:
@ -691,14 +695,14 @@ tools-min: update-vendor
@echo ">> Fetching license check"
@GOBIN=$(GOPATH)/bin go install github.com/google/addlicense@6d92264d717064f28b32464f0f9693a5b4ef0239
@echo ">> Fetching yamlfmt"
@GOBIN=$(GOPATH)/bin go install github.com/UltiRequiem/yamlfmt@v1.3.0
@GOBIN=$(GOPATH)/bin go install github.com/google/yamlfmt/cmd/yamlfmt@v0.10.0
.PHONY: tools
tools: tools-min
@echo ">> Fetching gci"
@GOBIN=$(GOPATH)/bin go install github.com/daixiang0/gci@v0.3.0
@echo ">> Fetching yamlfmt"
@GOBIN=$(GOPATH)/bin go install github.com/UltiRequiem/yamlfmt@v1.3.0
@GOBIN=$(GOPATH)/bin go install github.com/google/yamlfmt/cmd/yamlfmt@v0.10.0
@echo ">> Downloading protobuf compiler..."
@curl -L ${PROTOC_URL} -o $(GOPATH)/protoc.zip
@echo ">> Unzipping protobuf compiler..."

View file

@ -6,23 +6,19 @@ v1:
backoff:
properties:
iterations:
description: Iterations defines number of iterations before reaching
MaxDelay. Default to 5
description: Iterations defines number of iterations before reaching MaxDelay. Default to 5
format: int32
type: integer
max_delay:
description: MaxDelay defines maximum delay in seconds. Default to
600
description: MaxDelay defines maximum delay in seconds. Default to 600
format: int32
type: integer
max_iterations:
description: MaxIterations defines maximum number of iterations after
backoff will be disabled. Default to nil (no limit)
description: MaxIterations defines maximum number of iterations after backoff will be disabled. Default to nil (no limit)
format: int32
type: integer
min_delay:
description: MinDelay defines minimum delay in seconds. Default to
30
description: MinDelay defines minimum delay in seconds. Default to 30
format: int32
type: integer
type: object
@ -30,16 +26,14 @@ v1:
description: Deployment describes the deployment which should have a backup
properties:
name:
description: Name of the ArangoDeployment Custom Resource within same
namespace as ArangoBackup Custom Resource.
description: Name of the ArangoDeployment Custom Resource within same namespace as ArangoBackup Custom Resource.
type: string
type: object
download:
description: Download Backup download settings
properties:
credentialsSecretName:
description: CredentialsSecretName is the name of the secret used
while accessing repository
description: CredentialsSecretName is the name of the secret used while accessing repository
type: string
id:
description: ID of the ArangoBackup to be downloaded
@ -52,8 +46,7 @@ v1:
type: string
type: object
lifetime:
description: 'Lifetime is the time after which the backup will be deleted.
Format: "1.5h" or "2h45m".'
description: 'Lifetime is the time after which the backup will be deleted. Format: "1.5h" or "2h45m".'
type: string
options:
description: Options specifies backup options
@ -64,14 +57,12 @@ v1:
If this value is set to true, backup is taken even if we are not able to acquire lock.
type: boolean
timeout:
description: Timeout for Backup creation request in seconds. Works
only when AsyncBackupCreation feature is set to false.
description: Timeout for Backup creation request in seconds. Works only when AsyncBackupCreation feature is set to false.
format: float
type: number
type: object
policyName:
description: PolicyName name of the ArangoBackupPolicy which created this
Custom Resource
description: PolicyName name of the ArangoBackupPolicy which created this Custom Resource
type: string
upload:
description: |-
@ -79,8 +70,7 @@ v1:
This field can be removed and created again with different values. This operation will trigger upload again.
properties:
credentialsSecretName:
description: CredentialsSecretName is the name of the secret used
while accessing repository
description: CredentialsSecretName is the name of the secret used while accessing repository
type: string
repositoryURL:
description: |-
@ -100,23 +90,19 @@ v1alpha:
backoff:
properties:
iterations:
description: Iterations defines number of iterations before reaching
MaxDelay. Default to 5
description: Iterations defines number of iterations before reaching MaxDelay. Default to 5
format: int32
type: integer
max_delay:
description: MaxDelay defines maximum delay in seconds. Default to
600
description: MaxDelay defines maximum delay in seconds. Default to 600
format: int32
type: integer
max_iterations:
description: MaxIterations defines maximum number of iterations after
backoff will be disabled. Default to nil (no limit)
description: MaxIterations defines maximum number of iterations after backoff will be disabled. Default to nil (no limit)
format: int32
type: integer
min_delay:
description: MinDelay defines minimum delay in seconds. Default to
30
description: MinDelay defines minimum delay in seconds. Default to 30
format: int32
type: integer
type: object
@ -124,16 +110,14 @@ v1alpha:
description: Deployment describes the deployment which should have a backup
properties:
name:
description: Name of the ArangoDeployment Custom Resource within same
namespace as ArangoBackup Custom Resource.
description: Name of the ArangoDeployment Custom Resource within same namespace as ArangoBackup Custom Resource.
type: string
type: object
download:
description: Download Backup download settings
properties:
credentialsSecretName:
description: CredentialsSecretName is the name of the secret used
while accessing repository
description: CredentialsSecretName is the name of the secret used while accessing repository
type: string
id:
description: ID of the ArangoBackup to be downloaded
@ -146,8 +130,7 @@ v1alpha:
type: string
type: object
lifetime:
description: 'Lifetime is the time after which the backup will be deleted.
Format: "1.5h" or "2h45m".'
description: 'Lifetime is the time after which the backup will be deleted. Format: "1.5h" or "2h45m".'
type: string
options:
description: Options specifies backup options
@ -158,14 +141,12 @@ v1alpha:
If this value is set to true, backup is taken even if we are not able to acquire lock.
type: boolean
timeout:
description: Timeout for Backup creation request in seconds. Works
only when AsyncBackupCreation feature is set to false.
description: Timeout for Backup creation request in seconds. Works only when AsyncBackupCreation feature is set to false.
format: float
type: number
type: object
policyName:
description: PolicyName name of the ArangoBackupPolicy which created this
Custom Resource
description: PolicyName name of the ArangoBackupPolicy which created this Custom Resource
type: string
upload:
description: |-
@ -173,8 +154,7 @@ v1alpha:
This field can be removed and created again with different values. This operation will trigger upload again.
properties:
credentialsSecretName:
description: CredentialsSecretName is the name of the secret used
while accessing repository
description: CredentialsSecretName is the name of the secret used while accessing repository
type: string
repositoryURL:
description: |-

View file

@ -4,8 +4,7 @@ v1:
spec:
properties:
allowConcurrent:
description: AllowConcurrent if false, ArangoBackup will not be created
when previous Backups are not finished
description: AllowConcurrent if false, ArangoBackup will not be created when previous Backups are not finished
type: boolean
maxBackups:
description: |-
@ -19,8 +18,7 @@ v1:
Parsed by https://godoc.org/github.com/robfig/cron
type: string
selector:
description: DeploymentSelector Selector definition for selecting matching
ArangoBackup Custom Resources.
description: DeploymentSelector Selector definition for selecting matching ArangoBackup Custom Resources.
properties:
matchExpressions:
items:
@ -41,35 +39,29 @@ v1:
type: object
type: object
template:
description: ArangoBackupTemplate specifies additional options for newly
created ArangoBackup
description: ArangoBackupTemplate specifies additional options for newly created ArangoBackup
properties:
backoff:
properties:
iterations:
description: Iterations defines number of iterations before reaching
MaxDelay. Default to 5
description: Iterations defines number of iterations before reaching MaxDelay. Default to 5
format: int32
type: integer
max_delay:
description: MaxDelay defines maximum delay in seconds. Default
to 600
description: MaxDelay defines maximum delay in seconds. Default to 600
format: int32
type: integer
max_iterations:
description: MaxIterations defines maximum number of iterations
after backoff will be disabled. Default to nil (no limit)
description: MaxIterations defines maximum number of iterations after backoff will be disabled. Default to nil (no limit)
format: int32
type: integer
min_delay:
description: MinDelay defines minimum delay in seconds. Default
to 30
description: MinDelay defines minimum delay in seconds. Default to 30
format: int32
type: integer
type: object
lifetime:
description: 'Lifetime is the time after which the backup will be
deleted. Format: "1.5h" or "2h45m".'
description: 'Lifetime is the time after which the backup will be deleted. Format: "1.5h" or "2h45m".'
type: string
options:
properties:
@ -79,16 +71,14 @@ v1:
If this value is set to true, backup is taken even if we are not able to acquire lock.
type: boolean
timeout:
description: Timeout for Backup creation request in seconds. Works
only when AsyncBackupCreation feature is set to false.
description: Timeout for Backup creation request in seconds. Works only when AsyncBackupCreation feature is set to false.
format: float
type: number
type: object
upload:
properties:
credentialsSecretName:
description: CredentialsSecretName is the name of the secret used
while accessing repository
description: CredentialsSecretName is the name of the secret used while accessing repository
type: string
repositoryURL:
description: |-
@ -107,8 +97,7 @@ v1alpha:
spec:
properties:
allowConcurrent:
description: AllowConcurrent if false, ArangoBackup will not be created
when previous Backups are not finished
description: AllowConcurrent if false, ArangoBackup will not be created when previous Backups are not finished
type: boolean
maxBackups:
description: |-
@ -122,8 +111,7 @@ v1alpha:
Parsed by https://godoc.org/github.com/robfig/cron
type: string
selector:
description: DeploymentSelector Selector definition for selecting matching
ArangoBackup Custom Resources.
description: DeploymentSelector Selector definition for selecting matching ArangoBackup Custom Resources.
properties:
matchExpressions:
items:
@ -144,35 +132,29 @@ v1alpha:
type: object
type: object
template:
description: ArangoBackupTemplate specifies additional options for newly
created ArangoBackup
description: ArangoBackupTemplate specifies additional options for newly created ArangoBackup
properties:
backoff:
properties:
iterations:
description: Iterations defines number of iterations before reaching
MaxDelay. Default to 5
description: Iterations defines number of iterations before reaching MaxDelay. Default to 5
format: int32
type: integer
max_delay:
description: MaxDelay defines maximum delay in seconds. Default
to 600
description: MaxDelay defines maximum delay in seconds. Default to 600
format: int32
type: integer
max_iterations:
description: MaxIterations defines maximum number of iterations
after backoff will be disabled. Default to nil (no limit)
description: MaxIterations defines maximum number of iterations after backoff will be disabled. Default to nil (no limit)
format: int32
type: integer
min_delay:
description: MinDelay defines minimum delay in seconds. Default
to 30
description: MinDelay defines minimum delay in seconds. Default to 30
format: int32
type: integer
type: object
lifetime:
description: 'Lifetime is the time after which the backup will be
deleted. Format: "1.5h" or "2h45m".'
description: 'Lifetime is the time after which the backup will be deleted. Format: "1.5h" or "2h45m".'
type: string
options:
properties:
@ -182,16 +164,14 @@ v1alpha:
If this value is set to true, backup is taken even if we are not able to acquire lock.
type: boolean
timeout:
description: Timeout for Backup creation request in seconds. Works
only when AsyncBackupCreation feature is set to false.
description: Timeout for Backup creation request in seconds. Works only when AsyncBackupCreation feature is set to false.
format: float
type: number
type: object
upload:
properties:
credentialsSecretName:
description: CredentialsSecretName is the name of the secret used
while accessing repository
description: CredentialsSecretName is the name of the secret used while accessing repository
type: string
repositoryURL:
description: |-

File diff suppressed because it is too large Load diff

View file

@ -23,8 +23,7 @@ v1:
description: Overrides define Member Overrides (Override values from ServerGroup).
properties:
resources:
description: Resources holds resource requests & limits. Overrides
template provided on the group level.
description: Resources holds resource requests & limits. Overrides template provided on the group level.
properties:
limits:
additionalProperties:
@ -36,8 +35,7 @@ v1:
type: object
type: object
volumeClaimTemplate:
description: VolumeClaimTemplate specifies a template for volume claims.
Overrides template provided on the group level.
description: VolumeClaimTemplate specifies a template for volume claims. Overrides template provided on the group level.
properties:
apiVersion:
type: string
@ -222,8 +220,7 @@ v1:
type: object
type: object
template:
description: Template keeps template which is gonna be applied on the
Pod.
description: Template keeps template which is gonna be applied on the Pod.
properties:
checksum:
description: Checksum keep the Pod Spec Checksum (with ignored fields).
@ -2945,8 +2942,7 @@ v1:
type: object
type: object
podSpecChecksum:
description: PodSpecChecksum keep the Pod Spec Checksum (without ignored
fields).
description: PodSpecChecksum keep the Pod Spec Checksum (without ignored fields).
type: string
type: object
type: object
@ -2977,8 +2973,7 @@ v1alpha:
description: Overrides define Member Overrides (Override values from ServerGroup).
properties:
resources:
description: Resources holds resource requests & limits. Overrides
template provided on the group level.
description: Resources holds resource requests & limits. Overrides template provided on the group level.
properties:
limits:
additionalProperties:
@ -2990,8 +2985,7 @@ v1alpha:
type: object
type: object
volumeClaimTemplate:
description: VolumeClaimTemplate specifies a template for volume claims.
Overrides template provided on the group level.
description: VolumeClaimTemplate specifies a template for volume claims. Overrides template provided on the group level.
properties:
apiVersion:
type: string
@ -3176,8 +3170,7 @@ v1alpha:
type: object
type: object
template:
description: Template keeps template which is gonna be applied on the
Pod.
description: Template keeps template which is gonna be applied on the Pod.
properties:
checksum:
description: Checksum keep the Pod Spec Checksum (with ignored fields).
@ -5899,8 +5892,7 @@ v1alpha:
type: object
type: object
podSpecChecksum:
description: PodSpecChecksum keep the Pod Spec Checksum (without ignored
fields).
description: PodSpecChecksum keep the Pod Spec Checksum (without ignored fields).
type: string
type: object
type: object
@ -5931,8 +5923,7 @@ v2alpha1:
description: Overrides define Member Overrides (Override values from ServerGroup).
properties:
resources:
description: Resources holds resource requests & limits. Overrides
template provided on the group level.
description: Resources holds resource requests & limits. Overrides template provided on the group level.
properties:
limits:
additionalProperties:
@ -5944,8 +5935,7 @@ v2alpha1:
type: object
type: object
volumeClaimTemplate:
description: VolumeClaimTemplate specifies a template for volume claims.
Overrides template provided on the group level.
description: VolumeClaimTemplate specifies a template for volume claims. Overrides template provided on the group level.
properties:
apiVersion:
type: string
@ -6130,8 +6120,7 @@ v2alpha1:
type: object
type: object
template:
description: Template keeps template which is gonna be applied on the
Pod.
description: Template keeps template which is gonna be applied on the Pod.
properties:
checksum:
description: Checksum keep the Pod Spec Checksum (with ignored fields).
@ -8853,8 +8842,7 @@ v2alpha1:
type: object
type: object
podSpecChecksum:
description: PodSpecChecksum keep the Pod Spec Checksum (without ignored
fields).
description: PodSpecChecksum keep the Pod Spec Checksum (without ignored fields).
type: string
type: object
type: object

View file

@ -20,8 +20,7 @@ v1:
destination:
properties:
auth:
description: Authentication holds settings needed to authentication
at the syncmaster.
description: Authentication holds settings needed to authentication at the syncmaster.
properties:
keyfileSecretName:
description: |-
@ -54,8 +53,7 @@ v1:
type: string
type: array
tls:
description: TLS holds settings needed to verify the TLS connection
to the syncmaster.
description: TLS holds settings needed to verify the TLS connection to the syncmaster.
properties:
caSecretName:
description: |-
@ -67,8 +65,7 @@ v1:
source:
properties:
auth:
description: Authentication holds settings needed to authentication
at the syncmaster.
description: Authentication holds settings needed to authentication at the syncmaster.
properties:
keyfileSecretName:
description: |-
@ -101,8 +98,7 @@ v1:
type: string
type: array
tls:
description: TLS holds settings needed to verify the TLS connection
to the syncmaster.
description: TLS holds settings needed to verify the TLS connection to the syncmaster.
properties:
caSecretName:
description: |-
@ -136,8 +132,7 @@ v1alpha:
destination:
properties:
auth:
description: Authentication holds settings needed to authentication
at the syncmaster.
description: Authentication holds settings needed to authentication at the syncmaster.
properties:
keyfileSecretName:
description: |-
@ -170,8 +165,7 @@ v1alpha:
type: string
type: array
tls:
description: TLS holds settings needed to verify the TLS connection
to the syncmaster.
description: TLS holds settings needed to verify the TLS connection to the syncmaster.
properties:
caSecretName:
description: |-
@ -183,8 +177,7 @@ v1alpha:
source:
properties:
auth:
description: Authentication holds settings needed to authentication
at the syncmaster.
description: Authentication holds settings needed to authentication at the syncmaster.
properties:
keyfileSecretName:
description: |-
@ -217,8 +210,7 @@ v1alpha:
type: string
type: array
tls:
description: TLS holds settings needed to verify the TLS connection
to the syncmaster.
description: TLS holds settings needed to verify the TLS connection to the syncmaster.
properties:
caSecretName:
description: |-
@ -252,8 +244,7 @@ v2alpha1:
destination:
properties:
auth:
description: Authentication holds settings needed to authentication
at the syncmaster.
description: Authentication holds settings needed to authentication at the syncmaster.
properties:
keyfileSecretName:
description: |-
@ -274,26 +265,22 @@ v2alpha1:
If set this provides default values for masterEndpoint, auth & tls.
type: string
masterEndpoint:
description: MasterEndpoint holds a list of URLs used to reach the
syncmaster(s).
description: MasterEndpoint holds a list of URLs used to reach the syncmaster(s).
items:
type: string
type: array
tls:
description: TLS holds settings needed to verify the TLS connection
to the syncmaster.
description: TLS holds settings needed to verify the TLS connection to the syncmaster.
properties:
caSecretName:
description: CASecretName holds the name of a Secret containing
a ca.crt public key for TLS validation.
description: CASecretName holds the name of a Secret containing a ca.crt public key for TLS validation.
type: string
type: object
type: object
source:
properties:
auth:
description: Authentication holds settings needed to authentication
at the syncmaster.
description: Authentication holds settings needed to authentication at the syncmaster.
properties:
keyfileSecretName:
description: |-
@ -314,18 +301,15 @@ v2alpha1:
If set this provides default values for masterEndpoint, auth & tls.
type: string
masterEndpoint:
description: MasterEndpoint holds a list of URLs used to reach the
syncmaster(s).
description: MasterEndpoint holds a list of URLs used to reach the syncmaster(s).
items:
type: string
type: array
tls:
description: TLS holds settings needed to verify the TLS connection
to the syncmaster.
description: TLS holds settings needed to verify the TLS connection to the syncmaster.
properties:
caSecretName:
description: CASecretName holds the name of a Secret containing
a ca.crt public key for TLS validation.
description: CASecretName holds the name of a Secret containing a ca.crt public key for TLS validation.
type: string
type: object
type: object

View file

@ -4,28 +4,24 @@ v1alpha:
spec:
properties:
localPath:
description: LocalPath setting specifies one or more local directories
(on the nodes) used to create persistent volumes in.
description: LocalPath setting specifies one or more local directories (on the nodes) used to create persistent volumes in.
items:
type: string
type: array
nodeSelector:
additionalProperties:
type: string
description: NodeSelector setting specifies which nodes the operator will
provision persistent volumes on.
description: NodeSelector setting specifies which nodes the operator will provision persistent volumes on.
type: object
podCustomization:
properties:
priority:
description: Priority if defined, sets the priority for pods of storage
provisioner
description: Priority if defined, sets the priority for pods of storage provisioner
format: int32
type: integer
type: object
privileged:
description: Privileged if set, passes Privileged flag to SecurityContext
for pods of storage provisioner
description: Privileged if set, passes Privileged flag to SecurityContext for pods of storage provisioner
type: boolean
storageClass:
properties:
@ -42,13 +38,11 @@ v1alpha:
If a `StorageClass` with given name does not yet exist, it will be created.
type: string
reclaimPolicy:
description: ReclaimPolicy defines what happens to a persistent volume
when released from its claim.
description: ReclaimPolicy defines what happens to a persistent volume when released from its claim.
type: string
type: object
tolerations:
description: Tolerations specifies the tolerations added to pods of storage
provisioner
description: Tolerations specifies the tolerations added to pods of storage provisioner
items:
properties:
effect: