-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Start to work on a proposal of validation of config * first validation controller * Avoid race condition using validation-hash on pod * Design a validation manager * initialize validation manager * Add role * wait last generation of status on rpaas-api * working to validate file * Add tests about validation * Remove duplicated imports * Add tests about desired volumes and volumeMounts * Add tests that covers creation of validation pod * use k8s.io/utils/ptr instead of k8s.io/utils/pointer * Fix order of import * go mod tidy * Upgrade golangci-lint * Update nginx-operator * Add flag by cluster to disable validation * fix race condition * Upgrade kubernetes and version of rpaas-operator * Include CRD of RPaaSValidation on kustomize * Review some codes * Update lint
- Loading branch information
Showing
24 changed files
with
8,943 additions
and
309 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// Copyright 2024 tsuru authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
package v1alpha1 | ||
|
||
import ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
// +kubebuilder:object:root=true | ||
// +kubebuilder:resource:shortName=rpaas-validation | ||
// +kubebuilder:subresource:status | ||
// RpaasInstance is the Schema for the rpaasinstances API | ||
type RpaasValidation struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
Status RpaasValidationStatus `json:"status,omitempty"` | ||
// Spec reuse the same properties of RpaasInstance, just to avoid duplication of code | ||
Spec RpaasInstanceSpec `json:"spec,omitempty"` | ||
} | ||
|
||
// RpaasValidationStatus defines the observed state of RpaasValidation | ||
type RpaasValidationStatus struct { | ||
//Revision hash calculated for the current spec of rpaasvalidation | ||
RevisionHash string `json:"revisionHash,omitempty"` | ||
|
||
// The most recent generation observed by the rpaas operator controller. | ||
ObservedGeneration int64 `json:"observedGeneration,omitempty"` | ||
|
||
// Valid determines whether validation is valid | ||
Valid *bool `json:"valid,omitempty"` | ||
|
||
// Feedback of validation of nginx | ||
Error string `json:"error,omitempty"` | ||
} | ||
|
||
// +kubebuilder:object:root=true | ||
|
||
// RpaasValidationList contains a list of RpaasInstance | ||
type RpaasValidationList struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ListMeta `json:"metadata,omitempty"` | ||
Items []RpaasValidation `json:"items"` | ||
} | ||
|
||
func init() { | ||
SchemeBuilder.Register(&RpaasValidation{}, &RpaasValidationList{}) | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.