Skip to content

Commit 944b567

Browse files
authored
Remove GKE Integration (#2552)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
1 parent c9e5354 commit 944b567

File tree

38 files changed

+6
-2390
lines changed

38 files changed

+6
-2390
lines changed

cmd/console/operator.go

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@ package main
2222
import (
2323
"context"
2424
"fmt"
25-
"io/ioutil"
26-
"path/filepath"
2725
"strconv"
28-
"syscall"
2926
"time"
3027

3128
"github.com/minio/console/pkg/logger"
@@ -135,58 +132,6 @@ func buildOperatorServer() (*operatorapi.Server, error) {
135132
return server, nil
136133
}
137134

138-
func loadOperatorAllCerts(ctx *cli.Context) error {
139-
var err error
140-
// Set all certs and CAs directories path
141-
certs.GlobalCertsDir, _, err = certs.NewConfigDirFromCtx(ctx, "certs-dir", certs.DefaultCertsDir.Get)
142-
if err != nil {
143-
return err
144-
}
145-
146-
certs.GlobalCertsCADir = &certs.ConfigDir{Path: filepath.Join(certs.GlobalCertsDir.Get(), certs.CertsCADir)}
147-
// check if certs and CAs directories exists or can be created
148-
if err = certs.MkdirAllIgnorePerm(certs.GlobalCertsCADir.Get()); err != nil {
149-
return fmt.Errorf("unable to create certs CA directory at %s: failed with %w", certs.GlobalCertsCADir.Get(), err)
150-
}
151-
152-
// load the certificates and the CAs
153-
restapi.GlobalRootCAs, restapi.GlobalPublicCerts, restapi.GlobalTLSCertsManager, err = certs.GetAllCertificatesAndCAs()
154-
if err != nil {
155-
return fmt.Errorf("unable to load certificates at %s: failed with %w", certs.GlobalCertsDir.Get(), err)
156-
}
157-
158-
{
159-
// TLS flags from swagger server, used to support VMware vsphere operator version.
160-
swaggerServerCertificate := ctx.String("tls-certificate")
161-
swaggerServerCertificateKey := ctx.String("tls-key")
162-
swaggerServerCACertificate := ctx.String("tls-ca")
163-
// load tls cert and key from swagger server tls-certificate and tls-key flags
164-
if swaggerServerCertificate != "" && swaggerServerCertificateKey != "" {
165-
if err = restapi.GlobalTLSCertsManager.AddCertificate(swaggerServerCertificate, swaggerServerCertificateKey); err != nil {
166-
return err
167-
}
168-
x509Certs, err := certs.ParsePublicCertFile(swaggerServerCertificate)
169-
if err == nil {
170-
restapi.GlobalPublicCerts = append(restapi.GlobalPublicCerts, x509Certs...)
171-
}
172-
}
173-
174-
// load ca cert from swagger server tls-ca flag
175-
if swaggerServerCACertificate != "" {
176-
caCert, caCertErr := ioutil.ReadFile(swaggerServerCACertificate)
177-
if caCertErr == nil {
178-
restapi.GlobalRootCAs.AppendCertsFromPEM(caCert)
179-
}
180-
}
181-
}
182-
183-
if restapi.GlobalTLSCertsManager != nil {
184-
restapi.GlobalTLSCertsManager.ReloadOnSignal(syscall.SIGHUP)
185-
}
186-
187-
return nil
188-
}
189-
190135
// StartServer starts the console service
191136
func startOperatorServer(ctx *cli.Context) error {
192137
if err := loadAllCerts(ctx); err != nil {

operatorapi/integrations.go

Lines changed: 0 additions & 226 deletions
This file was deleted.

operatorapi/tenant_add.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import (
2020
"context"
2121
"encoding/base64"
2222
"fmt"
23-
"os"
2423

2524
"github.com/dustin/go-humanize"
2625

@@ -586,13 +585,6 @@ func getTenantCreatedResponse(session *models.Principal, params operator_api.Cre
586585
return nil, restapi.ErrorWithContext(ctx, err)
587586
}
588587

589-
// Integrations
590-
if os.Getenv("GKE_INTEGRATION") != "" {
591-
err := gkeIntegration(clientSet, tenantName, ns, session.STSSessionToken)
592-
if err != nil {
593-
return nil, restapi.ErrorWithContext(ctx, err)
594-
}
595-
}
596588
response = &models.CreateTenantResponse{
597589
ExternalIDP: tenantExternalIDPConfigured,
598590
}

pkg/apis/networking.gke.io/v1beta1/doc.go

Lines changed: 0 additions & 21 deletions
This file was deleted.

pkg/apis/networking.gke.io/v1beta1/register.go

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)