Skip to content

Commit

Permalink
Add kube-bind charts (#308)
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha authored Feb 12, 2024
1 parent ee8a44a commit 5112034
Show file tree
Hide file tree
Showing 65 changed files with 6,001 additions and 39 deletions.
13 changes: 0 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
# 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.

SHELL=/bin/bash -o pipefail

Expand Down
88 changes: 88 additions & 0 deletions apis/installer/v1alpha1/ace_catalog_manager_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 (
ResourceKindCatalogManager = "CatalogManager"
ResourceCatalogManager = "catalogmanager"
ResourceCatalogManagers = "catalogmanagers"
)

// CatalogManager defines the schama for CatalogManager operator 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=catalogmanagers,singular=catalogmanager,categories={kubeops,appscode}
type CatalogManager struct {
metav1.TypeMeta `json:",inline,omitempty"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec CatalogManagerSpec `json:"spec,omitempty"`
}

// CatalogManagerSpec is the schema for Identity Server values file
type CatalogManagerSpec 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 Monitoring `json:"monitoring"`

// +optional
VaultServer ObjectReference `json:"vaultServer"`
// +optional
SecretReaderServiceAccount ObjectReference `json:"secretReaderServiceAccount"`
}

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

// CatalogManagerList is a list of CatalogManagers
type CatalogManagerList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
// Items is a list of CatalogManager CRD objects
Items []CatalogManager `json:"items,omitempty"`
}
105 changes: 105 additions & 0 deletions apis/installer/v1alpha1/ace_service_backend_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
/*
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 (
ResourceKindServiceBackend = "ServiceBackend"
ResourceServiceBackend = "servicebackend"
ResourceServiceBackends = "servicebackends"
)

// ServiceBackend defines the schama for ServiceBackend operator 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=servicebackends,singular=servicebackend,categories={kubeops,appscode}
type ServiceBackend struct {
metav1.TypeMeta `json:",inline,omitempty"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ServiceBackendSpec `json:"spec,omitempty"`
}

// ServiceBackendSpec is the schema for Identity Server values file
type ServiceBackendSpec 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 Monitoring `json:"monitoring"`
Server ServerConfig `json:"server"`
}

type ServerConfig struct {
OIDC OIDC `json:"oidc"`
NamespacePrefix string `json:"namespacePrefix"`
ProviderPrettyName string `json:"providerPrettyName"`
ConsumerScope string `json:"consumerScope"`
// External External `json:"external"`
Cookie Cookie `json:"cookie"`
}

type OIDC struct {
ClientID string `json:"clientID"`
ClientSecret string `json:"clientSecret"`
IssuerURL string `json:"issuerURL"`
CallbackURL string `json:"callbackURL"`
}

type Cookie struct {
SigningKey string `json:"signingKey"`
EncryptionKey string `json:"encryptionKey"`
}

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

// ServiceBackendList is a list of ServiceBackends
type ServiceBackendList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
// Items is a list of ServiceBackend CRD objects
Items []ServiceBackend `json:"items,omitempty"`
}
119 changes: 119 additions & 0 deletions apis/installer/v1alpha1/ace_service_provider_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
/*
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 (
ResourceKindServiceProvider = "ServiceProvider"
ResourceServiceProvider = "serviceprovider"
ResourceServiceProviders = "serviceproviders"
)

// ServiceProvider defines the schama for ServiceProvider operator installer.

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

// +kubebuilder:object:root=true
type ServiceProvider struct {
metav1.TypeMeta `json:",inline,omitempty"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ServiceProviderSpec `json:"spec,omitempty"`
}

// ServiceProviderSpec is the schema for Operator Operator values file
type ServiceProviderSpec struct {
//+optional
NameOverride string `json:"nameOverride"`
//+optional
FullnameOverride string `json:"fullnameOverride"`
RegistryFQDN string `json:"registryFQDN"`
ReplicaCount int32 `json:"replicaCount"`
Operator Container `json:"operator"`
RbacProxy Container `json:"rbacproxy"`
ImagePullPolicy string `json:"imagePullPolicy"`
//+optional
ImagePullSecrets []string `json:"imagePullSecrets"`
//+optional
CriticalAddon bool `json:"criticalAddon"`
//+optional
LogLevel int32 `json:"logLevel"`
//+optional
Annotations map[string]string `json:"annotations"`
//+optional
PodAnnotations map[string]string `json:"podAnnotations"`
//+optional
PodLabels map[string]string `json:"podLabels"`
//+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"`
// 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"`
ServiceAccount ServiceAccountSpec `json:"serviceAccount"`
// +optional
Apiserver ServiceProviderApiserver `json:"apiserver"`
Monitoring Monitoring `json:"monitoring"`
Provider ProviderConfig `json:"provider"`
}

type ProviderConfig struct {
NamespacePrefix string `json:"namespacePrefix"`
ProviderPrettyName string `json:"providerPrettyName"`
ConsumerScope string `json:"consumerScope"`
External External `json:"external"`
}

type External struct {
Address string `json:"address"`
ServerName string `json:"serverName"`
CAFile string `json:"CAFile"`
}

type ServiceProviderApiserver struct {
GroupPriorityMinimum int `json:"groupPriorityMinimum"`
VersionPriority int `json:"versionPriority"`
EnableMutatingWebhook bool `json:"enableMutatingWebhook"`
EnableValidatingWebhook bool `json:"enableValidatingWebhook"`
Ca string `json:"ca"`
BypassValidatingWebhookXray bool `json:"bypassValidatingWebhookXray"`
UseKubeapiserverFqdnForAks bool `json:"useKubeapiserverFqdnForAks"`
Healthcheck HealthcheckSpec `json:"healthcheck"`
ServingCerts ServingCerts `json:"servingCerts"`
}

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

// ServiceProviderList is a list of ServiceProviders
type ServiceProviderList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
// Items is a list of ServiceProvider CRD objects
Items []ServiceProvider `json:"items,omitempty"`
}
6 changes: 6 additions & 0 deletions apis/installer/v1alpha1/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ func addKnownTypes(scheme *runtime.Scheme) error {
&BillingUiList{},
&CapiClusterPresets{},
&CapiClusterPresetsList{},
&CatalogManager{},
&CatalogManagerList{},
&CertManagerWebhookAce{},
&CertManagerWebhookAceList{},
&ClusterImporter{},
Expand Down Expand Up @@ -108,6 +110,10 @@ func addKnownTypes(scheme *runtime.Scheme) error {
&NatsList{},
&Reloader{},
&ReloaderList{},
&ServiceProvider{},
&ServiceProviderList{},
&ServiceBackend{},
&ServiceBackendList{},
)

scheme.AddKnownTypes(SchemeGroupVersion,
Expand Down
Loading

0 comments on commit 5112034

Please sign in to comment.