Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.
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
2 changes: 1 addition & 1 deletion .tools/nvim/__http__/accounts/accounts.graphql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
---

label: List Accounts
query: |+
query: |+ #graphql
query Accounts_listAccounts {
accounts_listAccounts {
isActive
Expand Down
2 changes: 1 addition & 1 deletion .tools/nvim/__http__/auth/auth.graphql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ query: |
}
}
variables:
code: "************"
code: "***************"
provider: github
state: "************"
---
Expand Down
6 changes: 6 additions & 0 deletions .tools/nvim/__http__/console/logs-and-metrics.rest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,9 @@ query:
method: GET
url: 'http://console-api.kl-core.svc.cluster.local:9100/observability/logs/cluster-job?start_time={{.startTime}}&end_time={{.endTime}}'
---

label: Get Logs for pod with a tracking id
query:
method: GET
url: 'http://localhost:12121/observability/logs?tracking_id={{.trackingId}}&cluster_name={{.clusterName}}'
---
41 changes: 41 additions & 0 deletions .tools/nvim/__http__/container-registry/build-runs.graphql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
global:
repoName: ""
crTriggerBuildId: ""
---
label: "list repos"
query: |+
query Cr_listRepos {
cr_listRepos {
edges {
node {
id
name
}
}
}
}
variables: {}
---
query: |+
query Cr_listBuilds($repoName: String!) {
cr_listBuilds(repoName: $repoName) {
edges {
node {
id
name
}
}
}
}
variables:
repoName: "{{.repoName}}"
---

query: |+
mutation Cr_triggerBuild($crTriggerBuildId: ID!) {
cr_triggerBuild(id: $crTriggerBuildId)
}
variables:
crTriggerBuildId: "{{.crTriggerBuildId}}"
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
global:
organization: ""
installationId: ""
---
query: |+
query Cr_listGithubInstallations {
cr_listGithubInstallations {
id
# appId
# targetId
account {
id
login
}
}
}
---
label: Search Github Repositories
query: |+
query Cr_searchGithubRepos($organization: String!, $search: String!) {
cr_searchGithubRepos(organization: $organization, search: $search) {
repositories {
fullName
name
masterBranch
permissions
}
}
}
variables:
organization: '{{.organization}}'
search: ''
---
label: List Github Repositories by Installation
query: |+
query Cr_listGithubRepos($installationId: Int!) {
cr_listGithubRepos(installationId: $installationId) {
repositories {
name
}
}
}
variables:
installationId: '{{.installationId}}'
---
16 changes: 16 additions & 0 deletions .tools/nvim/__http__/infra/byok-clusters.graphql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
label: Create BYOK Cluster
query: |+ #graphql
mutation Infra_createBYOKCluster($cluster: BYOKClusterIn!) {
infra_createBYOKCluster(cluster: $cluster) {
metadata {
name
}
}
}
variables:
cluster:
displayName: "{{.clusterName}}"
metadata:
name: "{{.clusterName}}"
---
21 changes: 11 additions & 10 deletions .tools/nvim/__http__/infra/cloud-provider-secrets.graphql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,18 @@ query: |+
name
namespace
}
aws {
awsAccountId
cfParamTrustedARN
cfParamStackName
cfParamRoleName
cfParamInstanceProfileName
cfParamExternalID
# aws {
# awsAccountId

secretKey
accessKey
}
# cfParamTrustedARN
# cfParamStackName
# cfParamRoleName
# cfParamInstanceProfileName
# cfParamExternalID

# secretKey
# accessKey
# }
Comment on lines +57 to +68
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

question (code_clarification): Commented out AWS specific fields in GraphQL query

}
}
}
Expand Down
169 changes: 138 additions & 31 deletions .tools/nvim/__http__/infra/clusters.graphql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,41 +36,148 @@ variables:

label: List Clusters
query: |+ #graphql
query Infra_listClusters($search: SearchCluster, $pagination: CursorPaginationIn) {
infra_listClusters(search: $search, pagination: $pagination) {
edges {
cursor
node {
id
kind
metadata {
name
namespace
# query Infra_listClusters($search: SearchCluster, $pagination: CursorPaginationIn) {
# infra_listClusters(search: $search, pagination: $pagination) {
# edges {
# cursor
# node {
# id
# kind
# metadata {
# name
# namespace
# }
# status {
# checks
# }
# spec {
# messageQueueTopicName
# }
# # clusterToken
# markedForDeletion
# syncStatus {
# action
# error
# lastSyncedAt
# state
# syncScheduledAt
# recordVersion
# }
# # adminKubeconfig {
# # value
# # encoding
# # }
# }
# }
# }
# }
query Infra_listClusterss(
$search: SearchCluster
$pagination: CursorPaginationIn
) {
infra_listClusters(search: $search, pagination: $pagination) {
totalCount
pageInfo {
startCursor
hasPreviousPage
hasNextPage
endCursor
}
status {
checks
}
spec {
messageQueueTopicName
}
# clusterToken
markedForDeletion
syncStatus {
action
error
lastSyncedAt
state
syncScheduledAt
recordVersion
edges {
cursor
node {
id
displayName
markedForDeletion
metadata {
name
annotations
generation
}
creationTime
lastUpdatedBy {
userId
userName
userEmail
}
createdBy {
userEmail
userId
userName
}
updateTime
status {
checks
checkList {
description
debug
name
title
}
isReady
lastReadyGeneration
lastReconcileTime
message {
RawMessage
}
resources {
apiVersion
kind
name
namespace
}
}
syncStatus {
action
error
lastSyncedAt
recordVersion
state
syncScheduledAt
}
recordVersion
spec {
messageQueueTopicName
kloudliteRelease

clusterTokenRef {
key
name
namespace
}
accountId
accountName
availabilityMode
aws {
k3sMasters {
iamInstanceProfileRole
instanceType
nodes
nvidiaGpuEnabled
rootVolumeSize
rootVolumeType
}
nodePools
region
spotNodePools
}
cloudProvider
backupToS3Enabled
cloudflareEnabled
clusterInternalDnsHost
output {
keyK3sAgentJoinToken
keyK3sServerJoinToken
keyKubeconfig
secretName
}
publicDNSHost
taintMasterNodes
}
}
}
# adminKubeconfig {
# value
# encoding
# }
}
}
}
}
variables:
search:
text:
Expand Down
12 changes: 12 additions & 0 deletions .tools/nvim/__http__/message_office/clustertoken.graphql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
label: Generate Cluster Token
query: |+ #graphql
mutation GenerateClusterToken($accountName: String!, $clusterName: String!) {
generateClusterToken(accountName: $accountName, clusterName: $clusterName)
}
variables:
accountName: "{{.accountName}}"
clusterName: "{{.clusterName}}"

---

18 changes: 18 additions & 0 deletions apps/console/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,30 @@ tasks:
cmds:
- go run ./main.go --dev

gen:constants:
cmds:
- go generate ./internal/entities/field-constants/gen.go

build:
cmds:
- task: gen:constants
- task: go:build
vars:
Out: ./bin/{{.app}}

local:build-and-push:
preconditions:
- sh: '[[ -n "{{.Image}}" ]]'
msg: "var Image must have a value, of format 'image_repository:image_tag'"
vars:
push: "{{.push | default false}}"
cmds:
- task: build
- nerdctl build -f ./Containerfile -t {{.Image}} . --build-arg BINARY={{.app}}
- |+
[ {{.push}} = "true" ] && nerdctl push {{.Image}}


container:build-and-push:
preconditions:
- sh: '[[ -n "{{.Image}}" ]]'
Expand Down
2 changes: 1 addition & 1 deletion apps/console/internal/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
"github.com/kloudlite/api/apps/console/internal/env"
"github.com/kloudlite/api/common"
"github.com/kloudlite/api/constants"
"github.com/kloudlite/api/grpc-interfaces/infra"
"github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/iam"
"github.com/kloudlite/api/grpc-interfaces/kloudlite.io/rpc/infra"
"github.com/kloudlite/api/pkg/grpc"
httpServer "github.com/kloudlite/api/pkg/http-server"
"github.com/kloudlite/api/pkg/kv"
Expand Down
Loading