Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: v1beta1 #313

Merged
merged 4 commits into from
Jul 1, 2021
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
9 changes: 0 additions & 9 deletions api/utils/allowed.go

This file was deleted.

38 changes: 0 additions & 38 deletions api/utils/podpriority.go

This file was deleted.

65 changes: 0 additions & 65 deletions api/utils/registry_test.go

This file was deleted.

6 changes: 3 additions & 3 deletions api/v1alpha1/conversion_hub.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ package v1alpha1
import (
"sigs.k8s.io/controller-runtime/pkg/conversion"

"github.com/clastix/capsule/api/v1beta1"
capsulev1beta1 "github.com/clastix/capsule/api/v1beta1"
)

func (t *Tenant) ConvertTo(dstRaw conversion.Hub) error {
dst := dstRaw.(*v1beta1.Tenant)
dst := dstRaw.(*capsulev1beta1.Tenant)

println(dst)

return nil
}

func (t *Tenant) ConvertFrom(srcRaw conversion.Hub) error {
src := srcRaw.(*v1beta1.Tenant)
src := srcRaw.(*capsulev1beta1.Tenant)

println(src)

Expand Down
29 changes: 0 additions & 29 deletions api/v1alpha1/ingress_hostnames_list.go

This file was deleted.

9 changes: 7 additions & 2 deletions api/v1alpha1/tenant_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
package v1alpha1

import (
"io/ioutil"

ctrl "sigs.k8s.io/controller-runtime"
logf "sigs.k8s.io/controller-runtime/pkg/log"
)
Expand All @@ -12,9 +14,12 @@ import (
var tenantlog = logf.Log.WithName("tenant-resource")

func (t *Tenant) SetupWebhookWithManager(mgr ctrl.Manager) error {
certData, _ := ioutil.ReadFile("/tmp/k8s-webhook-server/serving-certs/tls.crt")
if len(certData) == 0 {
return nil
}

return ctrl.NewWebhookManagedBy(mgr).
For(t).
Complete()
}

// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
4 changes: 2 additions & 2 deletions api/v1alpha1/zz_generated.deepcopy.go

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

2 changes: 1 addition & 1 deletion api/v1beta1/zz_generated.deepcopy.go

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

Loading