Skip to content

Commit

Permalink
Merge pull request tigera#3184 from rene-dekker/remove-manager-auth
Browse files Browse the repository at this point in the history
Remove auth that was not supported since ee v3.4
  • Loading branch information
marvin-tigera authored Mar 8, 2024
2 parents 3215828 + f207ec8 commit 18e5d9f
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 106 deletions.
33 changes: 0 additions & 33 deletions api/v1/manager_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ import (

// ManagerSpec defines configuration for the Calico Enterprise manager GUI.
type ManagerSpec struct {
// Deprecated. Please use the Authentication CR for configuring authentication.
// +optional
Auth *Auth `json:"auth,omitempty"`

// ManagerDeployment configures the Manager Deployment.
// +optional
Expand Down Expand Up @@ -101,9 +98,6 @@ type ManagerDeploymentInitContainer struct {

// ManagerStatus defines the observed state of the Calico Enterprise manager GUI.
type ManagerStatus struct {
// Deprecated. Please use the Authentication CR for configuring authentication.
// +optional
Auth *Auth `json:"auth,omitempty"`

// State provides user-readable status.
State string `json:"state,omitempty"`
Expand All @@ -114,33 +108,6 @@ type ManagerStatus struct {
Conditions []metav1.Condition `json:"conditions,omitempty"`
}

// Auth defines authentication configuration.
type Auth struct {
// Type configures the type of authentication used by the manager.
// Default: Token
// +kubebuilder:validation:Enum=Token;Basic;OIDC;OAuth
Type AuthType `json:"type,omitempty"`

// Authority configures the OAuth2/OIDC authority/issuer when using OAuth2 or OIDC login.
// +optional
Authority string `json:"authority,omitempty"`

// ClientId configures the OAuth2/OIDC client ID to use for OAuth2 or OIDC login.
// +optional
ClientID string `json:"clientID,omitempty"`
}

// AuthType represents the type of authentication to use. Valid
// options are: Token, Basic, OIDC, OAuth
type AuthType string

const (
AuthTypeToken = "Token"
AuthTypeBasic = "Basic"
AuthTypeOIDC = "OIDC"
AuthTypeOAuth = "OAuth"
)

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:resource:scope=Cluster
Expand Down
25 changes: 0 additions & 25 deletions api/v1/zz_generated.deepcopy.go

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

5 changes: 1 addition & 4 deletions pkg/controller/manager/manager_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,7 @@ func GetManager(ctx context.Context, cli client.Client, mt bool, ns string) (*op
if err != nil {
return nil, err
}
if instance.Spec.Auth != nil && instance.Spec.Auth.Type != operatorv1.AuthTypeToken {
return nil, fmt.Errorf("auth types other than 'Token' can no longer be configured using the Manager CR, " +
"please use the Authentication CR instead")
}

return instance, nil
}

Expand Down
44 changes: 0 additions & 44 deletions pkg/crds/operator/operator.tigera.io_managers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,28 +36,6 @@ spec:
description: Specification of the desired state for the Calico Enterprise
manager.
properties:
auth:
description: Deprecated. Please use the Authentication CR for configuring
authentication.
properties:
authority:
description: Authority configures the OAuth2/OIDC authority/issuer
when using OAuth2 or OIDC login.
type: string
clientID:
description: ClientId configures the OAuth2/OIDC client ID to
use for OAuth2 or OIDC login.
type: string
type:
description: 'Type configures the type of authentication used
by the manager. Default: Token'
enum:
- Token
- Basic
- OIDC
- OAuth
type: string
type: object
managerDeployment:
description: ManagerDeployment configures the Manager Deployment.
properties:
Expand Down Expand Up @@ -248,28 +226,6 @@ spec:
status:
description: Most recently observed state for the Calico Enterprise manager.
properties:
auth:
description: Deprecated. Please use the Authentication CR for configuring
authentication.
properties:
authority:
description: Authority configures the OAuth2/OIDC authority/issuer
when using OAuth2 or OIDC login.
type: string
clientID:
description: ClientId configures the OAuth2/OIDC client ID to
use for OAuth2 or OIDC login.
type: string
type:
description: 'Type configures the type of authentication used
by the manager. Default: Token'
enum:
- Token
- Basic
- OIDC
- OAuth
type: string
type: object
conditions:
description: Conditions represents the latest observed set of conditions
for the component. A component may be one or more of Ready, Progressing,
Expand Down

0 comments on commit 18e5d9f

Please sign in to comment.