-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: MobarakHsn <[email protected]>
- Loading branch information
1 parent
deb90f6
commit de7c424
Showing
64 changed files
with
8,499 additions
and
5,153 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
44 changes: 44 additions & 0 deletions
44
vendor/kmodules.xyz/offshoot-api/api/v1/openapi_generated.go
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
16 changes: 16 additions & 0 deletions
16
vendor/kmodules.xyz/offshoot-api/api/v1/zz_generated.deepcopy.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
64 changes: 64 additions & 0 deletions
64
vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/mssql_version_helpers.go
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,64 @@ | ||
/* | ||
Copyright AppsCode Inc. and Contributors | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package v1alpha1 | ||
|
||
import ( | ||
"fmt" | ||
|
||
"kubedb.dev/apimachinery/apis" | ||
"kubedb.dev/apimachinery/apis/catalog" | ||
"kubedb.dev/apimachinery/crds" | ||
|
||
"kmodules.xyz/client-go/apiextensions" | ||
) | ||
|
||
func (m MSSQLVersion) CustomResourceDefinition() *apiextensions.CustomResourceDefinition { | ||
return crds.MustCustomResourceDefinition(SchemeGroupVersion.WithResource(ResourcePluralMSSQLVersion)) | ||
} | ||
|
||
var _ apis.ResourceInfo = &MSSQLVersion{} | ||
|
||
func (m MSSQLVersion) ResourceFQN() string { | ||
return fmt.Sprintf("%s.%s", ResourcePluralMSSQLVersion, catalog.GroupName) | ||
} | ||
|
||
func (m MSSQLVersion) ResourceShortCode() string { | ||
return ResourceCodeMSSQLVersion | ||
} | ||
|
||
func (m MSSQLVersion) ResourceKind() string { | ||
return ResourceKindMSSQLVersion | ||
} | ||
|
||
func (m MSSQLVersion) ResourceSingular() string { | ||
return ResourceSingularMSSQLVersion | ||
} | ||
|
||
func (m MSSQLVersion) ResourcePlural() string { | ||
return ResourcePluralMSSQLVersion | ||
} | ||
|
||
func (m MSSQLVersion) ValidateSpecs() error { | ||
if m.Spec.Version == "" || m.Spec.DB.Image == "" || m.Spec.Coordinator.Image == "" { | ||
return fmt.Errorf(`at least one of the following specs is not set for MSSQLVersion "%v": | ||
spec.version, | ||
spec.coordinator.image, | ||
spec.initContainer.image`, m.Name) | ||
} | ||
// TODO: add m.spec.exporter.image check FOR monitoring | ||
return nil | ||
} |
106 changes: 106 additions & 0 deletions
106
vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/mssql_version_types.go
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,106 @@ | ||
/* | ||
Copyright 2023. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package v1alpha1 | ||
|
||
import ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
appcat "kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1" | ||
) | ||
|
||
const ( | ||
ResourceCodeMSSQLVersion = "msversion" | ||
ResourceKindMSSQLVersion = "MSSQLVersion" | ||
ResourceSingularMSSQLVersion = "mssqlversion" | ||
ResourcePluralMSSQLVersion = "mssqlversions" | ||
) | ||
|
||
// +genclient | ||
// +genclient:nonNamespaced | ||
// +genclient:skipVerbs=updateStatus | ||
// +k8s:openapi-gen=true | ||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
|
||
// +kubebuilder:object:root=true | ||
// +kubebuilder:resource:path=mssqlversions,singular=mssqlversion,scope=Cluster,shortName=msversion,categories={datastore,kubedb,appscode} | ||
// +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.version" | ||
// +kubebuilder:printcolumn:name="DB_IMAGE",type="string",JSONPath=".spec.db.image" | ||
// +kubebuilder:printcolumn:name="Deprecated",type="boolean",JSONPath=".spec.deprecated" | ||
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" | ||
type MSSQLVersion struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
Spec MSSQLVersionSpec `json:"spec,omitempty"` | ||
} | ||
|
||
// MSSQLVersionSpec defines the desired state of MSSQL Version | ||
type MSSQLVersionSpec struct { | ||
// Version | ||
Version string `json:"version"` | ||
// Database Image | ||
DB MSSQLVersionDatabase `json:"db"` | ||
// Coordinator Image | ||
// +optional | ||
Coordinator MSSQLCoordinator `json:"coordinator,omitempty"` | ||
// Init container Image | ||
InitContainer MSSQLInitContainer `json:"initContainer"` | ||
// Deprecated versions usable but regarded as obsolete and best avoided, typically due to having been superseded. | ||
// +optional | ||
Deprecated bool `json:"deprecated,omitempty"` | ||
// Stash defines backup and restore task definitions. | ||
// +optional | ||
Stash appcat.StashAddonSpec `json:"stash,omitempty"` | ||
// SecurityContext is for the additional config for the DB container | ||
// +optional | ||
SecurityContext SecurityContext `json:"securityContext"` | ||
// update constraints | ||
UpdateConstraints UpdateConstraints `json:"updateConstraints,omitempty"` | ||
} | ||
|
||
// MSSQLVersionDatabase is the MSSQL Database image | ||
type MSSQLVersionDatabase struct { | ||
Image string `json:"image"` | ||
} | ||
|
||
// MSSQLCoordinator is the MSSQL coordinator Container image | ||
type MSSQLCoordinator struct { | ||
Image string `json:"image"` | ||
} | ||
|
||
// MSSQLInitContainer is the MSSQL Container initializer | ||
type MSSQLInitContainer struct { | ||
Image string `json:"image"` | ||
} | ||
|
||
// MSSQLVersionPodSecurityPolicy is the MSSQL pod security policies | ||
type MSSQLVersionPodSecurityPolicy struct { | ||
DatabasePolicyName string `json:"databasePolicyName"` | ||
} | ||
|
||
// MSSQLSecurityContext is for additional configuration for the MSSQL database container | ||
type MSSQLSecurityContext struct { | ||
RunAsUser *int64 `json:"runAsUser,omitempty"` | ||
RunAsGroup *int64 `json:"runAsGroup,omitempty"` | ||
} | ||
|
||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
|
||
// MSSQLVersionList contains a list of MSSQLVersion | ||
type MSSQLVersionList struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ListMeta `json:"metadata,omitempty"` | ||
Items []MSSQLVersion `json:"items"` | ||
} |
Oops, something went wrong.