github.com/redhat-appstudio/release-service@v0.0.0-20240507045911-a8558ef3422a/api/v1alpha1/releaseserviceconfig_types.go (about) 1 /* 2 Copyright 2022. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 package v1alpha1 18 19 import ( 20 tektonv1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" 21 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 22 ) 23 24 const ReleaseServiceConfigResourceName string = "release-service-config" 25 26 // ReleaseServiceConfigSpec defines the desired state of ReleaseServiceConfig. 27 type ReleaseServiceConfigSpec struct { 28 // Debug is the boolean that specifies whether or not the Release Service should run 29 // in debug mode 30 // +optional 31 Debug bool `json:"debug,omitempty"` 32 33 // AdvisoryRepo is the repo to create advisories in during the managed release PipelineRun 34 // +optional 35 AdvisoryRepo string `json:"advisoryRepo,omitempty"` 36 37 // DefaultTimeouts contain the default Tekton timeouts to be used in case they are 38 // not specified in the ReleasePlanAdmission resource. 39 DefaultTimeouts tektonv1.TimeoutFields `json:"defaultTimeouts,omitempty"` 40 } 41 42 // ReleaseServiceConfigStatus defines the observed state of ReleaseServiceConfig. 43 type ReleaseServiceConfigStatus struct { 44 } 45 46 //+kubebuilder:object:root=true 47 //+kubebuilder:resource:shortName=rsc 48 //+kubebuilder:subresource:status 49 50 // ReleaseServiceConfig is the Schema for the releaseserviceconfigs API 51 type ReleaseServiceConfig struct { 52 metav1.TypeMeta `json:",inline"` 53 metav1.ObjectMeta `json:"metadata,omitempty"` 54 55 Spec ReleaseServiceConfigSpec `json:"spec,omitempty"` 56 Status ReleaseServiceConfigStatus `json:"status,omitempty"` 57 } 58 59 //+kubebuilder:object:root=true 60 61 // ReleaseServiceConfigList contains a list of ReleaseServiceConfig 62 type ReleaseServiceConfigList struct { 63 metav1.TypeMeta `json:",inline"` 64 metav1.ListMeta `json:"metadata,omitempty"` 65 Items []ReleaseServiceConfig `json:"items"` 66 } 67 68 func init() { 69 SchemeBuilder.Register(&ReleaseServiceConfig{}, &ReleaseServiceConfigList{}) 70 }