Skip to content
Open
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
5 changes: 5 additions & 0 deletions .changeset/forty-grapes-jog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cloudoperators/juno-app-greenhouse": patch
---

Remove legacy teams and secrets code
2 changes: 0 additions & 2 deletions apps/greenhouse/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"@testing-library/react": "16.3.2",
"@testing-library/user-event": "14.6.1",
"@types/js-yaml": "4.0.9",
"@types/lodash": "4.17.24",
"@types/react": "19.2.17",
"@types/react-dom": "19.2.3",
"@vitejs/plugin-react": "6.0.4",
Expand Down Expand Up @@ -64,7 +63,6 @@
"@tanstack/react-query": "5.100.14",
"@tanstack/react-router": "1.170.18",
"js-yaml": "4.3.0",
"lodash": "4.18.1",
"zod": "4.4.3"
}
}
317 changes: 0 additions & 317 deletions apps/greenhouse/src/components/admin/types/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1247,323 +1247,6 @@ export interface components {
weight?: number
}
}
/**
* TeamRoleBinding
* @description TeamRoleBinding is the Schema for the rolebindings API
*/
TeamRoleBinding: {
/**
* @description APIVersion defines the versioned schema of this representation of an object.
* Servers should convert recognized schemas to the latest internal value, and
* may reject unrecognized values.
* More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
*/
apiVersion?: string
/**
* @description Kind is a string value representing the REST resource this object represents.
* Servers may infer this from the endpoint the client submits requests to.
* Cannot be updated.
* In CamelCase.
* More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
*/
kind?: string
metadata?: {
name?: string
namespace?: string
/** Format: uuid */
uid?: string
resourceVersion?: string
/** Format: date-time */
creationTimestamp?: string
/** Format: date-time */
deletionTimestamp?: string
labels?: {
[key: string]: string
}
annotations?: {
[key: string]: string
}
}
/** @description TeamRoleBindingSpec defines the desired state of a TeamRoleBinding */
spec?: {
/** @description ClusterSelector is used to select a Cluster or Clusters the TeamRoleBinding should be deployed to. */
clusterSelector?: {
/** @description Name of a single Cluster to select. */
clusterName?: string
/** @description LabelSelector is a label query over a set of Clusters. */
labelSelector?: {
/** @description matchExpressions is a list of label selector requirements. The requirements are ANDed. */
matchExpressions?: {
/** @description key is the label key that the selector applies to. */
key: string
/**
* @description operator represents a key's relationship to a set of values.
* Valid operators are In, NotIn, Exists and DoesNotExist.
*/
operator: string
/**
* @description values is an array of string values. If the operator is In or NotIn,
* the values array must be non-empty. If the operator is Exists or DoesNotExist,
* the values array must be empty. This array is replaced during a strategic
* merge patch.
*/
values?: string[]
}[]
/**
* @description matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
* map is equivalent to an element of matchExpressions, whose key field is "key", the
* operator is "In", and the values array contains only "value". The requirements are ANDed.
*/
matchLabels?: {
[key: string]: string
}
}
}
/**
* @description CreateNamespaces when enabled the controller will create namespaces for RoleBindings if they do not exist.
* @default false
*/
createNamespaces: boolean
/**
* @description Namespaces is a list of namespaces in the Greenhouse Clusters to apply the RoleBinding to.
* If empty, a ClusterRoleBinding will be created on the remote cluster, otherwise a RoleBinding per namespace.
*/
namespaces?: string[]
/** @description TeamRef references a Greenhouse Team by name */
teamRef?: string
/** @description TeamRoleRef references a Greenhouse TeamRole by name */
teamRoleRef?: string
/** @description Usernames defines list of users to add to the (Cluster-)RoleBindings */
usernames?: string[]
}
/** @description TeamRoleBindingStatus defines the observed state of the TeamRoleBinding */
status?: {
/** @description PropagationStatus is the list of clusters the TeamRoleBinding is applied to */
clusters?: {
/** @description ClusterName is the name of the cluster the rbacv1 resources are created on. */
clusterName: string
/** @description Condition is the overall Status of the rbacv1 resources created on the cluster */
condition?: {
/**
* Format: date-time
* @description LastTransitionTime is the last time the condition transitioned from one status to another.
*/
lastTransitionTime: string
/** @description Message is an optional human-readable message indicating details about the last transition. */
message?: string
/** @description Reason is a one-word, CamelCase reason for the condition's last transition. */
reason?: string
/** @description Status of the condition. */
status: string
/** @description Type of the condition. */
type: string
}
}[]
/** @description StatusConditions contain the different conditions that constitute the status of the TeamRoleBinding. */
statusConditions?: {
conditions?: {
/**
* Format: date-time
* @description LastTransitionTime is the last time the condition transitioned from one status to another.
*/
lastTransitionTime: string
/** @description Message is an optional human-readable message indicating details about the last transition. */
message?: string
/** @description Reason is a one-word, CamelCase reason for the condition's last transition. */
reason?: string
/** @description Status of the condition. */
status: string
/** @description Type of the condition. */
type: string
}[]
}
}
}
/**
* TeamRole
* @description TeamRole is the Schema for the TeamRoles API
*/
TeamRole: {
/**
* @description APIVersion defines the versioned schema of this representation of an object.
* Servers should convert recognized schemas to the latest internal value, and
* may reject unrecognized values.
* More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
*/
apiVersion?: string
/**
* @description Kind is a string value representing the REST resource this object represents.
* Servers may infer this from the endpoint the client submits requests to.
* Cannot be updated.
* In CamelCase.
* More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
*/
kind?: string
metadata?: {
name?: string
namespace?: string
/** Format: uuid */
uid?: string
resourceVersion?: string
/** Format: date-time */
creationTimestamp?: string
/** Format: date-time */
deletionTimestamp?: string
labels?: {
[key: string]: string
}
annotations?: {
[key: string]: string
}
}
/** @description TeamRoleSpec defines the desired state of a TeamRole */
spec?: {
/** @description AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole on the remote cluster */
aggregationRule?: {
/**
* @description ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules.
* If any of the selectors match, then the ClusterRole's permissions will be added
*/
clusterRoleSelectors?: {
/** @description matchExpressions is a list of label selector requirements. The requirements are ANDed. */
matchExpressions?: {
/** @description key is the label key that the selector applies to. */
key: string
/**
* @description operator represents a key's relationship to a set of values.
* Valid operators are In, NotIn, Exists and DoesNotExist.
*/
operator: string
/**
* @description values is an array of string values. If the operator is In or NotIn,
* the values array must be non-empty. If the operator is Exists or DoesNotExist,
* the values array must be empty. This array is replaced during a strategic
* merge patch.
*/
values?: string[]
}[]
/**
* @description matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
* map is equivalent to an element of matchExpressions, whose key field is "key", the
* operator is "In", and the values array contains only "value". The requirements are ANDed.
*/
matchLabels?: {
[key: string]: string
}
}[]
}
/**
* @description Labels are applied to the ClusterRole created on the remote cluster.
* This allows using TeamRoles as part of AggregationRules by other TeamRoles
*/
labels?: {
[key: string]: string
}
/** @description Rules is a list of rbacv1.PolicyRules used on a managed RBAC (Cluster)Role */
rules?: {
/**
* @description APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of
* the enumerated resources in any API group will be allowed. "" represents the core API group and "*" represents all API groups.
*/
apiGroups?: string[]
/**
* @description NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path
* Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding.
* Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both.
*/
nonResourceURLs?: string[]
/** @description ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. */
resourceNames?: string[]
/** @description Resources is a list of resources this rule applies to. '*' represents all resources. */
resources?: string[]
/** @description Verbs is a list of Verbs that apply to ALL the ResourceKinds contained in this rule. '*' represents all verbs. */
verbs: string[]
}[]
}
/** @description TeamRoleStatus defines the observed state of a TeamRole */
status?: Record<string, never>
}
/**
* Team
* @description Team is the Schema for the teams API
*/
Team: {
/**
* @description APIVersion defines the versioned schema of this representation of an object.
* Servers should convert recognized schemas to the latest internal value, and
* may reject unrecognized values.
* More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
*/
apiVersion?: string
/**
* @description Kind is a string value representing the REST resource this object represents.
* Servers may infer this from the endpoint the client submits requests to.
* Cannot be updated.
* In CamelCase.
* More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
*/
kind?: string
metadata?: {
name?: string
namespace?: string
/** Format: uuid */
uid?: string
resourceVersion?: string
/** Format: date-time */
creationTimestamp?: string
/** Format: date-time */
deletionTimestamp?: string
labels?: {
[key: string]: string
}
annotations?: {
[key: string]: string
}
}
/** @description TeamSpec defines the desired state of Team */
spec?: {
/** @description Description provides additional details of the team. */
description?: string
/** @description URL to join the IdP group. */
joinUrl?: string
/** @description IdP group id matching team. */
mappedIdPGroup?: string
}
/** @description TeamStatus defines the observed state of Team */
status?: {
members?: {
/** @description Email of the user. */
email: string
/** @description FirstName of the user. */
firstName: string
/** @description ID is the unique identifier of the user. */
id: string
/** @description LastName of the user. */
lastName: string
}[]
/**
* @description A StatusConditions contains a list of conditions.
* Only one condition of a given type may exist in the list.
*/
statusConditions: {
conditions?: {
/**
* Format: date-time
* @description LastTransitionTime is the last time the condition transitioned from one status to another.
*/
lastTransitionTime: string
/** @description Message is an optional human-readable message indicating details about the last transition. */
message?: string
/** @description Reason is a one-word, CamelCase reason for the condition's last transition. */
reason?: string
/** @description Status of the condition. */
status: string
/** @description Type of the condition. */
type: string
}[]
}
}
}
/**
* PluginsWithExposedServices
* @description PluginsWithExposedServices is the Schema for plugins filtered by those that have exposed services
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ import React from "react"
import { useActivePlugin } from "./StoreProvider"
import { lazy, Suspense } from "react"
const Clusters = lazy(() => import("./components/clusters/App"))
const Secrets = lazy(() => import("./components/secrets/App"))
const Plugins = lazy(() => import("./components/plugins/App"))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking, shouldn't we remove that too?

const Teams = lazy(() => import("./components/teams/App"))

// import Plugin from "./Plugin"

Comment on lines 7 to 13
Expand All @@ -22,15 +20,9 @@ const AppContainer = ({ apiEndpoint, auth }: any) => {
case "clusters":
ActivePlugin = Clusters
break
case "secrets":
ActivePlugin = Secrets
break
case "plugins":
ActivePlugin = Plugins
break
case "teams":
ActivePlugin = Teams
break
default:
ActivePlugin = Clusters
}
Comment on lines 20 to 28
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ import { useActivePlugin, useActions } from "../StoreProvider"

const PLUGINS = [
{ name: "clusters", label: "Clusters" },
{ name: "teams", label: "Teams" },
{ name: "plugins", label: "Plugins", beta: true },
{ name: "secrets", label: "Secrets", beta: true },
]

const SideNav = () => {
Expand Down
Loading
Loading