Skip to content

Commit

Permalink
Add kubedb-gitops chart
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Feb 27, 2025
1 parent a352af0 commit b76be09
Show file tree
Hide file tree
Showing 38 changed files with 371,296 additions and 6 deletions.
107 changes: 107 additions & 0 deletions apis/installer/v1alpha1/kubedb_gitops_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
/*
Copyright AppsCode Inc. and Contributors
Licensed under the AppsCode Community License 1.0.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://github.com/appscode/licenses/raw/1.0.0/AppsCode-Community-1.0.0.md
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 (
core "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

const (
ResourceKindKubedbGitops = "KubedbGitops"
ResourceKubedbGitops = "kubedbgitops"
ResourceKubedbGitopss = "kubedbgitopss"
)

// KubedbGitops defines the schama for Operator Shard Manager installer.

// +genclient
// +genclient:skipVerbs=updateStatus
// +k8s:openapi-gen=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// +kubebuilder:object:root=true
// +kubebuilder:resource:path=kubedbgitopss,singular=kubedbgitops,categories={kubeops,appscode}
type KubedbGitops struct {
metav1.TypeMeta `json:",inline,omitempty"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec KubedbGitopsSpec `json:"spec,omitempty"`
}

// KubedbGitopsSpec is the schema for Identity Server values file
type KubedbGitopsSpec struct {
//+optional
NameOverride string `json:"nameOverride"`
//+optional
FullnameOverride string `json:"fullnameOverride"`
//+optional
RegistryFQDN string `json:"registryFQDN"`
ReplicaCount int32 `json:"replicaCount"`
Image ImageReference `json:"image"`
//+optional
ImagePullSecrets []string `json:"imagePullSecrets"`
//+optional
PodAnnotations map[string]string `json:"podAnnotations"`
//+optional
PodLabels map[string]string `json:"podLabels"`
// PodSecurityContext holds pod-level security attributes and common container settings.
// Optional: Defaults to empty. See type description for default values of each field.
// +optional
PodSecurityContext *core.PodSecurityContext `json:"podSecurityContext"`
//+optional
SecurityContext *core.SecurityContext `json:"securityContext"`
//+optional
Resources core.ResourceRequirements `json:"resources"`
//+optional
NodeSelector map[string]string `json:"nodeSelector"`
// If specified, the pod's tolerations.
// +optional
Tolerations []core.Toleration `json:"tolerations"`
// If specified, the pod's scheduling constraints
// +optional
Affinity *core.Affinity `json:"affinity"`
// +optional
LivenessProbe *core.Probe `json:"livenessProbe"`
// +optional
ReadinessProbe *core.Probe `json:"readinessProbe"`
Service ServiceSpec `json:"service"`
ServiceAccount ServiceAccountSpec `json:"serviceAccount"`
Volumes []core.Volume `json:"volumes"`
VolumeMounts []core.VolumeMount `json:"volumeMounts"`
}

type ImageReference struct {
Registry string `json:"registry"`
Repository string `json:"repository"`
Tag string `json:"tag"`
PullPolicy string `json:"pullPolicy"`
}

type ServiceSpec struct {
Type string `json:"type"`
Port int `json:"port"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// KubedbGitopsList is a list of KubedbGitopss
type KubedbGitopsList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
// Items is a list of KubedbGitops CRD objects
Items []KubedbGitops `json:"items,omitempty"`
}
2 changes: 2 additions & 0 deletions apis/installer/v1alpha1/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ func addKnownTypes(scheme *runtime.Scheme) error {
&KubedbCrdManagerList{},
&KubedbDashboard{},
&KubedbDashboardList{},
&KubedbGitops{},
&KubedbGitopsList{},
&Kubedb{},
&KubedbList{},
&KubedbKubestashCatalog{},
Expand Down
1 change: 1 addition & 0 deletions apis/installer/v1alpha1/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func TestDefaultValues(t *testing.T) {
schemachecker.TestCase{Obj: v1alpha1.KubedbCatalogSpec{}},
schemachecker.TestCase{Obj: v1alpha1.KubedbCrdManagerSpec{}},
schemachecker.TestCase{Obj: v1alpha1.KubedbDashboardSpec{}},
schemachecker.TestCase{Obj: v1alpha1.KubedbGitopsSpec{}},
schemachecker.TestCase{Obj: v1alpha1.KubedbKubestashCatalogSpec{}},
schemachecker.TestCase{Obj: v1alpha1.KubedbOpsManagerSpec{}},
schemachecker.TestCase{Obj: v1alpha1.KubedbProviderAwsSpec{}},
Expand Down
184 changes: 184 additions & 0 deletions apis/installer/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions charts/kubedb-gitops/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
13 changes: 13 additions & 0 deletions charts/kubedb-gitops/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v2
name: kubedb-gitops
description: KubeDB GitOps operator by AppsCode
type: application
version: v0.0.1
appVersion: v0.0.1
home: https://github.com/kubedb/gitops
icon: https://cdn.appscode.com/images/products/kubedb/kubedb-icon.png
sources:
- https://github.com/kubedb/gitops
maintainers:
- name: appscode
email: [email protected]
Loading

0 comments on commit b76be09

Please sign in to comment.