Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ openapi: $(addprefix openapi-, $(subst :,_, $(API_GROUPS)))
-w $(DOCKER_REPO_ROOT) \
--env HTTP_PROXY=$(HTTP_PROXY) \
--env HTTPS_PROXY=$(HTTPS_PROXY) \
--env GO111MODULE=on \
--env GOFLAGS="-mod=vendor" \
$(BUILD_IMAGE) \
go run hack/gencrd/main.go
Expand Down Expand Up @@ -381,7 +380,6 @@ lint: $(BUILD_DIRS)
-v $$(pwd)/.go/cache:/.cache \
--env HTTP_PROXY=$(HTTP_PROXY) \
--env HTTPS_PROXY=$(HTTPS_PROXY) \
--env GO111MODULE=on \
--env GOFLAGS="-mod=vendor" \
$(BUILD_IMAGE) \
golangci-lint run
Expand All @@ -397,8 +395,8 @@ verify: verify-gen verify-modules

.PHONY: verify-modules
verify-modules:
GO111MODULE=on go mod tidy
GO111MODULE=on go mod vendor
go mod tidy
go mod vendor
@if !(git diff --exit-code HEAD); then \
echo "go module files are out of date"; exit 1; \
fi
Expand Down
1 change: 0 additions & 1 deletion apis/installer/v1alpha1/aws_credential_manager_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ const (
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// +kubebuilder:object:root=true
// +kubebuilder:resource:path=aceshifters,singular=aceshifter,categories={kubeops,appscode}
type AwsCredentialManager struct {
metav1.TypeMeta `json:",inline,omitempty"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand Down
118 changes: 118 additions & 0 deletions apis/installer/v1alpha1/gcp_credential_manager_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
/*
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"
"kmodules.xyz/resource-metadata/apis/shared"
)

const (
ResourceKindGcpCredentialManager = "GcpCredentialManager"
ResourceGcpCredentialManager = "gcpcredentialmanager"
ResourceGcpCredentialManagers = "gcpcredentialmanagers"
)

// GcpCredentialManager defines the schema for GcpCredentialManager 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 GcpCredentialManager struct {
metav1.TypeMeta `json:",inline,omitempty"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec GcpCredentialManagerSpec `json:"spec,omitempty"`
}

// GcpCredentialManagerSpec is the schema for GCP Credential Manager values file.
type GcpCredentialManagerSpec 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"`
// +optional
Distro shared.DistroSpec `json:"distro"`
// +optional
Apiserver GcpCredentialManagerApiserver `json:"apiserver"`
// +optional
BucketAccessor GcpBucketAccessor `json:"bucketAccessor"`
}

type GcpCredentialManagerApiserver 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"`
}

type GcpBucketAccessor struct {
GcsMaxIntervalSeconds string `json:"gcsMaxIntervalSeconds"`
GcsMaxWaitSeconds string `json:"gcsMaxWaitSeconds"`
}

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

// GcpCredentialManagerList is a list of GcpCredentialManagers.
type GcpCredentialManagerList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
// Items is a list of GcpCredentialManager CRD objects.
Items []GcpCredentialManager `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 @@ -56,6 +56,8 @@ func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&AwsCredentialManager{},
&AwsCredentialManagerList{},
&GcpCredentialManager{},
&GcpCredentialManagerList{},
&CapaVpcPeeringOperator{},
&CapaVpcPeeringOperatorList{},
&CapiOpsManager{},
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 @@ -28,6 +28,7 @@ import (
func TestDefaultValues(t *testing.T) {
checker := sc.New(os.DirFS("../../.."),
sc.TestCase{Obj: v1alpha1.AwsCredentialManagerSpec{}},
sc.TestCase{Obj: v1alpha1.GcpCredentialManagerSpec{}},
sc.TestCase{Obj: v1alpha1.CapaVpcPeeringOperatorSpec{}},
sc.TestCase{Obj: v1alpha1.CapiOpsManagerSpec{}},
sc.TestCase{Obj: v1alpha1.DockerMachineOperatorSpec{}},
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.

Loading
Loading