Skip to content

Commit

Permalink
Add crossplane provider charts (#702)
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha authored Nov 11, 2023
1 parent f7c2130 commit 7a9b181
Show file tree
Hide file tree
Showing 184 changed files with 69,083 additions and 2 deletions.
88 changes: 88 additions & 0 deletions apis/installer/v1alpha1/provider_aws_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
/*
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 (
ResourceKindKubedbProviderAws = "KubedbProviderAws"
ResourceKubedbProviderAws = "kubedbprovideraws"
ResourceKubedbProviderAwss = "kubedbproviderawss"
)

// KubedbProviderAws defines the schama for Kubeform AWS provider 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=kubedbproviderawss,singular=kubedbprovideraws,categories={kubeform,appscode}
type KubedbProviderAws struct {
metav1.TypeMeta `json:",inline,omitempty"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec KubedbProviderAwsSpec `json:"spec,omitempty"`
}

// KubedbProviderAwsSpec is the schema for Identity Server values file
type KubedbProviderAwsSpec struct {
//+optional
NameOverride string `json:"nameOverride"`
//+optional
FullnameOverride string `json:"fullnameOverride"`
ReplicaCount int `json:"replicaCount"`
RegistryFQDN string `json:"registryFQDN"`
Image Container `json:"image"`
//+optional
ImagePullSecrets []string `json:"imagePullSecrets"`
ImagePullPolicy string `json:"imagePullPolicy"`
ServiceAccount ServiceAccountSpec `json:"serviceAccount"`
//+optional
PodAnnotations map[string]string `json:"podAnnotations"`
// 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
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"`
Monitoring EASMonitoring `json:"monitoring"`
Aws AwsProviderConfig `json:"aws"`
}

type AwsProviderConfig struct {
SecretName string `json:"secretName"`
}

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

// KubedbProviderAwsList is a list of KubedbProviderAwss
type KubedbProviderAwsList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
// Items is a list of KubedbProviderAws CRD objects
Items []KubedbProviderAws `json:"items,omitempty"`
}
88 changes: 88 additions & 0 deletions apis/installer/v1alpha1/provider_azure_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
/*
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 (
ResourceKindKubedbProviderAzure = "KubedbProviderAzure"
ResourceKubedbProviderAzure = "kubedbproviderazure"
ResourceKubedbProviderAzures = "kubedbproviderazures"
)

// KubedbProviderAzure defines the schama for Kubeform AWS provider 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=kubedbproviderazures,singular=kubedbproviderazure,categories={kubeform,appscode}
type KubedbProviderAzure struct {
metav1.TypeMeta `json:",inline,omitempty"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec KubedbProviderAzureSpec `json:"spec,omitempty"`
}

// KubedbProviderAzureSpec is the schema for Identity Server values file
type KubedbProviderAzureSpec struct {
//+optional
NameOverride string `json:"nameOverride"`
//+optional
FullnameOverride string `json:"fullnameOverride"`
ReplicaCount int `json:"replicaCount"`
RegistryFQDN string `json:"registryFQDN"`
Image Container `json:"image"`
//+optional
ImagePullSecrets []string `json:"imagePullSecrets"`
ImagePullPolicy string `json:"imagePullPolicy"`
ServiceAccount ServiceAccountSpec `json:"serviceAccount"`
//+optional
PodAnnotations map[string]string `json:"podAnnotations"`
// 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
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"`
Monitoring EASMonitoring `json:"monitoring"`
Azure AzureProviderConfig `json:"azure"`
}

type AzureProviderConfig struct {
SecretName string `json:"secretName"`
}

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

// KubedbProviderAzureList is a list of KubedbProviderAzures
type KubedbProviderAzureList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
// Items is a list of KubedbProviderAzure CRD objects
Items []KubedbProviderAzure `json:"items,omitempty"`
}
89 changes: 89 additions & 0 deletions apis/installer/v1alpha1/provider_gcp_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
/*
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 (
ResourceKindKubedbProviderGcp = "KubedbProviderGcp"
ResourceKubedbProviderGcp = "kubedbprovidergcp"
ResourceKubedbProviderGcps = "kubedbprovidergcps"
)

// KubedbProviderGcp defines the schama for Kubeform AWS provider 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=kubedbprovidergcps,singular=kubedbprovidergcp,categories={kubeform,appscode}
type KubedbProviderGcp struct {
metav1.TypeMeta `json:",inline,omitempty"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec KubedbProviderGcpSpec `json:"spec,omitempty"`
}

// KubedbProviderGcpSpec is the schema for Identity Server values file
type KubedbProviderGcpSpec struct {
//+optional
NameOverride string `json:"nameOverride"`
//+optional
FullnameOverride string `json:"fullnameOverride"`
ReplicaCount int `json:"replicaCount"`
RegistryFQDN string `json:"registryFQDN"`
Image Container `json:"image"`
//+optional
ImagePullSecrets []string `json:"imagePullSecrets"`
ImagePullPolicy string `json:"imagePullPolicy"`
ServiceAccount ServiceAccountSpec `json:"serviceAccount"`
//+optional
PodAnnotations map[string]string `json:"podAnnotations"`
// 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
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"`
Monitoring EASMonitoring `json:"monitoring"`
Gcp GcpProviderConfig `json:"gcp"`
}

type GcpProviderConfig struct {
ProjectID string `json:"projectID"`
SecretName string `json:"secretName"`
}

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

// KubedbProviderGcpList is a list of KubedbProviderGcps
type KubedbProviderGcpList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
// Items is a list of KubedbProviderGcp CRD objects
Items []KubedbProviderGcp `json:"items,omitempty"`
}
5 changes: 4 additions & 1 deletion apis/installer/v1alpha1/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,16 @@ import (

func TestDefaultValues(t *testing.T) {
checker := schemachecker.New(os.DirFS("../../.."),
schemachecker.TestCase{Obj: v1alpha1.KubedbProviderAwsSpec{}},
schemachecker.TestCase{Obj: v1alpha1.KubedbProviderAzureSpec{}},
schemachecker.TestCase{Obj: v1alpha1.KubedbProviderGcpSpec{}},
schemachecker.TestCase{Obj: v1alpha1.KubedbAutoscalerSpec{}},
schemachecker.TestCase{Obj: v1alpha1.KubedbCatalogSpec{}},
schemachecker.TestCase{Obj: v1alpha1.KubedbDashboardSpec{}},
schemachecker.TestCase{Obj: v1alpha1.KubedbSpec{}},
schemachecker.TestCase{Obj: v1alpha1.KubedbOpsManagerSpec{}},
schemachecker.TestCase{Obj: v1alpha1.KubedbProvisionerSpec{}},
schemachecker.TestCase{Obj: v1alpha1.KubedbSchemaManagerSpec{}},
schemachecker.TestCase{Obj: v1alpha1.KubedbSpec{}},
schemachecker.TestCase{Obj: v1alpha1.KubedbUiServerSpec{}},
schemachecker.TestCase{Obj: v1alpha1.KubedbWebhookServerSpec{}},
)
Expand Down
Loading

0 comments on commit 7a9b181

Please sign in to comment.