Skip to content

Commit

Permalink
add node conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
maciaszczykm committed Apr 2, 2024
1 parent 91f8ad8 commit c24d380
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 24 deletions.
6 changes: 6 additions & 0 deletions assets/src/components/kubernetes/cluster/Node.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ import { GaugeWrap, ResourceGauge } from '../../cluster/Gauges'

import { usePodColumns } from '../workloads/Pods'

import Conditions from '../common/Conditions'

import { getBreadcrumbs } from './Nodes'
import { useEventsColumns } from './Events'
import { NodeReadyChip } from './utils'
Expand Down Expand Up @@ -124,6 +126,10 @@ export function NodeInfo(): ReactElement {
TODO
</Card>
</section>
<section>
<SubTitle>Conditions</SubTitle>
<Conditions conditions={node.conditions} />
</section>
<section>
<SubTitle>Node information</SubTitle>
<Card
Expand Down
30 changes: 17 additions & 13 deletions assets/src/generated/graphql-kubernetes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4737,7 +4737,7 @@ export type NodeQueryVariables = Exact<{
}>;


export type NodeQuery = { __typename?: 'Query', handleGetNodeDetail?: { __typename?: 'node_NodeDetail', providerID: string, containerImages: Array<string | null>, podCIDR: string, phase: string, unschedulable: boolean, ready: string, errors: Array<any | null>, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, nodeInfo: { __typename?: 'v1_NodeSystemInfo', architecture: string, bootID: string, containerRuntimeVersion: string, kernelVersion: string, kubeletVersion: string, kubeProxyVersion: string, machineID: string, operatingSystem: string, osImage: string, systemUUID: string }, allocatedResources: { __typename?: 'node_NodeAllocatedResources', cpuRequests: any, cpuRequestsFraction: number, cpuCapacity: any, memoryRequests: any, memoryRequestsFraction: number, memoryCapacity: any, allocatedPods: number, podFraction: number, podCapacity: any }, addresses?: Array<{ __typename?: 'v1_NodeAddress', type: string, address: string } | null> | null, taints?: Array<{ __typename?: 'v1_Taint', key: string, value?: string | null, effect: string } | null> | null } | null };
export type NodeQuery = { __typename?: 'Query', handleGetNodeDetail?: { __typename?: 'node_NodeDetail', providerID: string, containerImages: Array<string | null>, podCIDR: string, phase: string, unschedulable: boolean, ready: string, errors: Array<any | null>, typeMeta: { __typename?: 'types_TypeMeta', kind?: string | null, restartable?: boolean | null, scalable?: boolean | null }, objectMeta: { __typename?: 'types_ObjectMeta', uid?: string | null, name?: string | null, namespace?: string | null, labels?: any | null, annotations?: any | null, creationTimestamp?: string | null }, conditions: Array<{ __typename?: 'common_Condition', message: string, type: string, status: string, lastProbeTime: string, lastTransitionTime: string, reason: string } | null>, allocatedResources: { __typename?: 'node_NodeAllocatedResources', cpuRequests: any, cpuRequestsFraction: number, cpuCapacity: any, memoryRequests: any, memoryRequestsFraction: number, memoryCapacity: any, allocatedPods: number, podFraction: number, podCapacity: any }, nodeInfo: { __typename?: 'v1_NodeSystemInfo', architecture: string, bootID: string, containerRuntimeVersion: string, kernelVersion: string, kubeletVersion: string, kubeProxyVersion: string, machineID: string, operatingSystem: string, osImage: string, systemUUID: string }, addresses?: Array<{ __typename?: 'v1_NodeAddress', type: string, address: string } | null> | null, taints?: Array<{ __typename?: 'v1_Taint', key: string, value?: string | null, effect: string } | null> | null } | null };

export type NodePodsQueryVariables = Exact<{
namespace: Scalars['String']['input'];
Expand Down Expand Up @@ -6388,17 +6388,8 @@ export const NodeDocument = gql`
objectMeta @type(name: "types_ObjectMeta") {
...ObjectMeta
}
nodeInfo {
architecture
bootID
containerRuntimeVersion
kernelVersion
kubeletVersion
kubeProxyVersion
machineID
operatingSystem
osImage
systemUUID
conditions @type(name: "common_Condition") {
...Condition
}
allocatedResources {
cpuRequests
Expand All @@ -6411,6 +6402,18 @@ export const NodeDocument = gql`
podFraction
podCapacity
}
nodeInfo {
architecture
bootID
containerRuntimeVersion
kernelVersion
kubeletVersion
kubeProxyVersion
machineID
operatingSystem
osImage
systemUUID
}
addresses {
type
address
Expand All @@ -6430,7 +6433,8 @@ export const NodeDocument = gql`
}
}
${TypeMetaFragmentDoc}
${ObjectMetaFragmentDoc}`;
${ObjectMetaFragmentDoc}
${ConditionFragmentDoc}`;

/**
* __useNodeQuery__
Expand Down
25 changes: 14 additions & 11 deletions assets/src/graph-kubernetes/cluster/node.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,8 @@ query Node($name: String!) {
objectMeta @type(name: "types_ObjectMeta") {
...ObjectMeta
}
nodeInfo {
architecture
bootID
containerRuntimeVersion
kernelVersion
kubeletVersion
kubeProxyVersion
machineID
operatingSystem
osImage
systemUUID
conditions @type(name: "common_Condition") {
...Condition
}
allocatedResources {
cpuRequests
Expand All @@ -71,6 +62,18 @@ query Node($name: String!) {
podFraction
podCapacity
}
nodeInfo {
architecture
bootID
containerRuntimeVersion
kernelVersion
kubeletVersion
kubeProxyVersion
machineID
operatingSystem
osImage
systemUUID
}
addresses {
type
address
Expand Down

0 comments on commit c24d380

Please sign in to comment.