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
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ spec:
type: string
type: object
status:
description: Status defines the observed state of the Teleport resource
properties:
conditions:
description: Conditions represent the latest available observations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ spec:
type: array
type: object
status:
description: TeleportGithubConnectorStatus defines the observed state
of TeleportGithubConnector
description: Status defines the observed state of the Teleport resource
properties:
conditions:
description: Conditions represent the latest available observations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ spec:
type: object
type: object
status:
description: Status defines the observed state of the Teleport resource
properties:
conditions:
description: Conditions represent the latest available observations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ spec:
type: string
type: object
status:
description: TeleportOIDCConnectorStatus defines the observed state of
TeleportOIDCConnector
description: Status defines the observed state of the Teleport resource
properties:
conditions:
description: Conditions represent the latest available observations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ spec:
type: integer
type: object
status:
description: Status defines the observed state of the Teleport resource
properties:
conditions:
description: Conditions represent the latest available observations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,7 @@ spec:
type: object
type: object
status:
description: TeleportProvisionTokenStatus defines the observed state of
TeleportProvisionToken
description: Status defines the observed state of the Teleport resource
properties:
conditions:
description: Conditions represent the latest available observations
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ spec:
type: string
type: object
status:
description: TeleportSAMLConnectorStatus defines the observed state of
TeleportSAMLConnector
description: Status defines the observed state of the Teleport resource
properties:
conditions:
description: Conditions represent the latest available observations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ spec:
type: array
type: object
status:
description: TeleportUserStatus defines the observed state of TeleportUser
description: Status defines the observed state of the Teleport resource
properties:
conditions:
description: Conditions represent the latest available observations
Expand Down
41 changes: 41 additions & 0 deletions integrations/operator/apis/resources/status.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Teleport
* Copyright (C) 2023 Gravitational, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package resources

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// Status defines the observed state of the Teleport resource
type Status struct {
// Conditions represent the latest available observations of an object's state
// +optional
Conditions []metav1.Condition `json:"conditions"`
// +optional
TeleportResourceID int64 `json:"teleportResourceID"`
}

// DeepCopyInto deep-copies one resource status into another.
// Required to satisfy runtime.Object interface.
func (status *Status) DeepCopyInto(out *Status) {
*out = Status{}
out.Conditions = make([]metav1.Condition, len(status.Conditions))
copy(out.Conditions, status.Conditions)
out.TeleportResourceID = status.TeleportResourceID
}
12 changes: 2 additions & 10 deletions integrations/operator/apis/resources/v1/accesslist_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,13 @@ type TeleportAccessList struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec TeleportAccessListSpec `json:"spec,omitempty"`
Status TeleportAccessListStatus `json:"status,omitempty"`
Spec TeleportAccessListSpec `json:"spec,omitempty"`
Status resources.Status `json:"status,omitempty"`
}

// TeleportAccessListSpec defines the desired state of TeleportProvisionToken
type TeleportAccessListSpec accesslist.Spec

type TeleportAccessListStatus struct {
// Conditions represent the latest available observations of an object's state
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
// +optional
TeleportResourceID int64 `json:"teleportResourceID,omitempty"`
}

//+kubebuilder:object:root=true

// TeleportAccessListList contains a list of TeleportAccessList
Expand Down
12 changes: 2 additions & 10 deletions integrations/operator/apis/resources/v1/loginrule_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ type TeleportLoginRule struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec TeleportLoginRuleSpec `json:"spec,omitempty"`
Status TeleportLoginRuleStatus `json:"status,omitempty"`
Spec TeleportLoginRuleSpec `json:"spec,omitempty"`
Status resources.Status `json:"status,omitempty"`
}

// TeleportLoginRuleSpec matches the JSON of generated CRD spec
Expand All @@ -51,14 +51,6 @@ type TeleportLoginRuleSpec struct {
TraitsMap map[string][]string `json:"traits_map,omitempty"`
}

type TeleportLoginRuleStatus struct {
// Conditions represent the latest available observations of an object's state
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
// +optional
TeleportResourceID int64 `json:"teleportResourceID,omitempty"`
}

//+kubebuilder:object:root=true

// TeleportLoginRuleList contains a list of TeleportLoginRule
Expand Down
12 changes: 2 additions & 10 deletions integrations/operator/apis/resources/v1/okta_import_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ type TeleportOktaImportRule struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec TeleportOktaImportRuleSpec `json:"spec,omitempty"`
Status TeleportOktaImportRuleStatus `json:"status,omitempty"`
Spec TeleportOktaImportRuleSpec `json:"spec,omitempty"`
Status resources.Status `json:"status,omitempty"`
}

// TeleportOktaImportRuleSpec matches the JSON of generated CRD spec
Expand Down Expand Up @@ -71,14 +71,6 @@ type TeleportOktaImportRuleList struct {
Items []TeleportOktaImportRule `json:"items"`
}

type TeleportOktaImportRuleStatus struct {
// Conditions represent the latest available observations of an object's state
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
// +optional
TeleportResourceID int64 `json:"teleportResourceID,omitempty"`
}

// ToTeleport returns an OktaImportRule, which wraps the actual
// [types.OktaImportRuleV1] and implements the necessary interface methods used
// by the TeleportResourceReconciler.
Expand Down
67 changes: 0 additions & 67 deletions integrations/operator/apis/resources/v1/zz_generated.deepcopy.go

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

13 changes: 2 additions & 11 deletions integrations/operator/apis/resources/v2/provisiontoken_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,6 @@ func init() {
// TeleportProvisionTokenSpec defines the desired state of TeleportProvisionToken
type TeleportProvisionTokenSpec types.ProvisionTokenSpecV2

// TeleportProvisionTokenStatus defines the observed state of TeleportProvisionToken
type TeleportProvisionTokenStatus struct {
// Conditions represent the latest available observations of an object's state
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
// +optional
TeleportResourceID int64 `json:"teleportResourceID,omitempty"`
}

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status

Expand All @@ -49,8 +40,8 @@ type TeleportProvisionToken struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec TeleportProvisionTokenSpec `json:"spec,omitempty"`
Status TeleportProvisionTokenStatus `json:"status,omitempty"`
Spec TeleportProvisionTokenSpec `json:"spec,omitempty"`
Status resources.Status `json:"status,omitempty"`
}

//+kubebuilder:object:root=true
Expand Down
13 changes: 2 additions & 11 deletions integrations/operator/apis/resources/v2/samlconnector_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,6 @@ func init() {
// TeleportSAMLConnectorSpec defines the desired state of TeleportSAMLConnector
type TeleportSAMLConnectorSpec types.SAMLConnectorSpecV2

// TeleportSAMLConnectorStatus defines the observed state of TeleportSAMLConnector
type TeleportSAMLConnectorStatus struct {
// Conditions represent the latest available observations of an object's state
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
// +optional
TeleportResourceID int64 `json:"teleportResourceID,omitempty"`
}

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status

Expand All @@ -49,8 +40,8 @@ type TeleportSAMLConnector struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec TeleportSAMLConnectorSpec `json:"spec,omitempty"`
Status TeleportSAMLConnectorStatus `json:"status,omitempty"`
Spec TeleportSAMLConnectorSpec `json:"spec,omitempty"`
Status resources.Status `json:"status,omitempty"`
}

//+kubebuilder:object:root=true
Expand Down
13 changes: 2 additions & 11 deletions integrations/operator/apis/resources/v2/user_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,6 @@ func init() {
// TeleportUserSpec defines the desired state of TeleportUser
type TeleportUserSpec types.UserSpecV2

// TeleportUserStatus defines the observed state of TeleportUser
type TeleportUserStatus struct {
// Conditions represent the latest available observations of an object's state
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
// +optional
TeleportResourceID int64 `json:"teleportResourceID,omitempty"`
}

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status

Expand All @@ -49,8 +40,8 @@ type TeleportUser struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec TeleportUserSpec `json:"spec,omitempty"`
Status TeleportUserStatus `json:"status,omitempty"`
Spec TeleportUserSpec `json:"spec,omitempty"`
Status resources.Status `json:"status,omitempty"`
}

//+kubebuilder:object:root=true
Expand Down
Loading