Skip to content

Commit

Permalink
chore(deps): updates
Browse files Browse the repository at this point in the history
  • Loading branch information
morlay committed Mar 13, 2023
1 parent de52995 commit f834b80
Show file tree
Hide file tree
Showing 8 changed files with 147 additions and 104 deletions.
2 changes: 1 addition & 1 deletion cue.mod/module.cue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module: "github.com/octohelm/kubepkg"

require: {
"github.com/innoai-tech/runtime": "v0.0.0-20230301034018-d0f9cf039113"
"github.com/innoai-tech/runtime": "v0.0.0-20230313062040-872280802f3b"
"k8s.io/api": "v0.25.4"
"k8s.io/apimachinery": "v0.25.4"
"wagon.octohelm.tech": "v0.0.0-20200202235959-e64a70c55ed2"
Expand Down
2 changes: 1 addition & 1 deletion cue.mod/module.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github.com/innoai-tech/runtime v0.0.0-20230301034018-d0f9cf039113 h1:+7EMEnNP3i+le/nZ7lbx8+Ta8IBcOVyzwKscE37lAYU=
github.com/innoai-tech/runtime v0.0.0-20230313062040-872280802f3b h1:BKnLADxBLU0SKiWIa9ZEL2is7AzLc1B4b0YY21D4vBg=
wagon.octohelm.tech v0.0.0-20200202235959-3d91e2e3161f
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"devDependencies": {
"@innoai-tech/devconfig": "^0.1.2",
"@innoai-tech/gents": "^0.3.3",
"@innoai-tech/monobundle": "^0.5.2",
"@innoai-tech/monobundle": "^0.5.3",
"@innoai-tech/vite-presets": "^0.6.2",
"@nodepkg/devconfig": "workspace:*",
"@testing-library/react": "^14.0.0",
Expand Down
14 changes: 7 additions & 7 deletions pnpm-lock.yaml

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

87 changes: 87 additions & 0 deletions tool/kubepkg_export.cue
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
package tool

import (
"wagon.octohelm.tech/core"

"github.com/octohelm/kubepkg/cuepkg/kubepkg"
"github.com/octohelm/kubepkg/cuepkg/kubepkgcli"
kubepkgcomponent "github.com/octohelm/kubepkg/cuepkg/component/kubepkg"
)

actions: {
_env: core.#ClientEnv & {
KUBEPKG_REMOTE_REGISTRY_ENDPOINT: _ | *""
KUBEPKG_REMOTE_REGISTRY_USERNAME: _ | *""
KUBEPKG_REMOTE_REGISTRY_PASSWORD: _ | *""

KUBEPKG_AUTH_PROVIDER_OIDC_ENDPOINT: _ | *""
KUBEPKG_SIGN_PRIVATE_KEY: _ | *""
KUBEPKG_DB_ENDPOINT: _ | *""
}

_version: core.#Version & {
}

#Export: kubepkgcli.#Export & {
"run": tag: "\(_version.output)"
"env": {
"KUBEPKG_LOG_LEVEL": "DEBUG"
"KUBEPKG_REMOTE_REGISTRY_ENDPOINT": "\(_env.KUBEPKG_REMOTE_REGISTRY_ENDPOINT)"
"KUBEPKG_REMOTE_REGISTRY_USERNAME": "\(_env.KUBEPKG_REMOTE_REGISTRY_USERNAME)"
"KUBEPKG_REMOTE_REGISTRY_PASSWORD": "\(_env.KUBEPKG_REMOTE_REGISTRY_PASSWORD)"
}
}

"dashboard": {
for arch in ["amd64", "arm64"] {
"\(arch)": #Export & {
"arch": "\(arch)"
"filename": "dashboard.\(arch).kube.tgz"
"kubepkg": kubepkgcomponent.#KubepkgDashboard & {
metadata: namespace: "kubepkg"
spec: {
version: "\(_version.output)"
config: {
"KUBEPKG_SIGN_PRIVATE_KEY": "\(_env.KUBEPKG_SIGN_PRIVATE_KEY)"
"KUBEPKG_AUTH_PROVIDER_OIDC_ENDPOINT": "\(_env.KUBEPKG_AUTH_PROVIDER_OIDC_ENDPOINT)"
"KUBEPKG_DB_ENDPOINT": "\(_env.KUBEPKG_DB_ENDPOINT)"
"KUBEPKG_DB_ENABLE_MIGRATE": "true"
}
}
}
}
}
}

"kubepkg": {
for arch in ["amd64", "arm64"] {
"\(arch)": #Export & {
"arch": "\(arch)"
"filename": "kubepkg.\(arch).kube.tgz"
"kubepkg": kubepkg.#KubePkgList & {
items: [
kubepkgcomponent.#KubepkgAgent & {
metadata: namespace: "kube-system"
spec: version: "\(_version.output)"
},
kubepkgcomponent.#KubepkgOperator & {
metadata: namespace: "kube-system"
spec: version: "\(_version.output)"
},
kubepkgcomponent.#ContainerRegistry & {
metadata: namespace: "kube-system"
spec: {
version: "\(_version.output)"
config: {
"KUBEPKG_REMOTE_REGISTRY_ENDPOINT": "@secret/container-registry/endpoint?"
"KUBEPKG_REMOTE_REGISTRY_USERNAME": "@secret/container-registry/username?"
"KUBEPKG_REMOTE_REGISTRY_PASSWORD": "@secret/container-registry/password?"
}
}
},
]
}
}
}
}
}
17 changes: 17 additions & 0 deletions tool/setup.cue
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package tool

import "wagon.octohelm.tech/core"

setting: {
_env: core.#ClientEnv & {
GH_USERNAME: string | *""
GH_PASSWORD: core.#Secret
}

setup: core.#Setting & {
registry: "ghcr.io": auth: {
username: _env.GH_USERNAME
secret: _env.GH_PASSWORD
}
}
}
126 changes: 32 additions & 94 deletions wagon.cue
Original file line number Diff line number Diff line change
Expand Up @@ -5,42 +5,15 @@ import (

"wagon.octohelm.tech/core"
"github.com/innoai-tech/runtime/cuepkg/imagetool"
"github.com/innoai-tech/runtime/cuepkg/kubepkgtool"
"github.com/innoai-tech/runtime/cuepkg/node"
"github.com/innoai-tech/runtime/cuepkg/golang"
"github.com/octohelm/kubepkg/cuepkg/kubepkg"
"github.com/octohelm/kubepkg/cuepkg/kubepkgcli"

"github.com/octohelm/kubepkg/tool"
kubepkgcomponent "github.com/octohelm/kubepkg/cuepkg/component/kubepkg"
)

pkg: {
version: core.#Version & {
}
}

client: core.#Client & {
env: {
GH_USERNAME: string | *""
GH_PASSWORD: core.#Secret

CONTAINER_REGISTRY_PULL_PROXY: string | *""
NPM_REGISTRY_SERVER: string | *""

KUBEPKG_REMOTE_REGISTRY_ENDPOINT: _ | *""
KUBEPKG_REMOTE_REGISTRY_USERNAME: _ | *""
KUBEPKG_REMOTE_REGISTRY_PASSWORD: _ | *""

KUBEPKG_AUTH_PROVIDER_OIDC_ENDPOINT: _ | *""
KUBEPKG_SIGN_PRIVATE_KEY: _ | *""
KUBEPKG_DB_ENDPOINT: _ | *""
}
}

setting: core.#Setting & {
registry: "ghcr.io": auth: {
username: client.env.GH_USERNAME
secret: client.env.GH_PASSWORD
}
}
tool

actions: webapp: node.#Project & {
source: {
Expand Down Expand Up @@ -72,10 +45,16 @@ actions: webapp: node.#Project & {
script: "pnpm exec turbo run build --no-cache"
image: {
"steps": [
node.#ConfigPrivateRegistry & {
scope: "@innoai-tech"
host: "npm.pkg.github.com"
token: client.env.GH_PASSWORD
{
_env: core.#ClientEnv & {
GH_PASSWORD: core.#Secret
}

node.#ConfigPrivateRegistry & {
scope: "@innoai-tech"
host: "npm.pkg.github.com"
token: _env.GH_PASSWORD
}
},
imagetool.#Script & {
run: [
Expand All @@ -87,6 +66,11 @@ actions: webapp: node.#Project & {
}
}

pkg: {
version: core.#Version & {
}
}

actions: go: golang.#Project & {
source: {
path: "."
Expand Down Expand Up @@ -129,69 +113,23 @@ actions: go: golang.#Project & {
}
}

actions: {
_version: pkg.version.output

#Export: kubepkgcli.#Export & {
"run": tag: "\(_version)"
"env": {
"KUBEPKG_LOG_LEVEL": "DEBUG"
"KUBEPKG_REMOTE_REGISTRY_ENDPOINT": "\(client.env.KUBEPKG_REMOTE_REGISTRY_ENDPOINT)"
"KUBEPKG_REMOTE_REGISTRY_USERNAME": "\(client.env.KUBEPKG_REMOTE_REGISTRY_USERNAME)"
"KUBEPKG_REMOTE_REGISTRY_PASSWORD": "\(client.env.KUBEPKG_REMOTE_REGISTRY_PASSWORD)"
actions: apply: {
operator: kubepkgtool.#ApplyToDashboard & {
target: group: "system"
kubepkg: kubepkgcomponent.#KubepkgOperator & {
spec: version: pkg.version.output
}
}

"dashboard": {
for arch in ["amd64", "arm64"] {
"\(arch)": #Export & {
"arch": "\(arch)"
"filename": "dashboard.\(arch).kube.tgz"
"kubepkg": kubepkgcomponent.#KubepkgDashboard & {
metadata: namespace: "kubepkg"
spec: {
version: "\(_version)"
config: {
"KUBEPKG_SIGN_PRIVATE_KEY": "\(client.env.KUBEPKG_SIGN_PRIVATE_KEY)"
"KUBEPKG_AUTH_PROVIDER_OIDC_ENDPOINT": "\(client.env.KUBEPKG_AUTH_PROVIDER_OIDC_ENDPOINT)"
"KUBEPKG_DB_ENDPOINT": "\(client.env.KUBEPKG_DB_ENDPOINT)"
"KUBEPKG_DB_ENABLE_MIGRATE": "true"
}
}
}
}
agent: kubepkgtool.#ApplyToDashboard & {
target: group: "system"
kubepkg: kubepkgcomponent.#KubepkgAgent & {
spec: version: pkg.version.output
}
}

"kubepkg": {
for arch in ["amd64", "arm64"] {
"\(arch)": #Export & {
"arch": "\(arch)"
"filename": "kubepkg.\(arch).kube.tgz"
"kubepkg": kubepkg.#KubePkgList & {
items: [
kubepkgcomponent.#KubepkgAgent & {
metadata: namespace: "kube-system"
spec: version: "\(_version)"
},
kubepkgcomponent.#KubepkgOperator & {
metadata: namespace: "kube-system"
spec: version: "\(_version)"
},
kubepkgcomponent.#ContainerRegistry & {
metadata: namespace: "kube-system"
spec: {
version: "\(_version)"
config: {
"KUBEPKG_REMOTE_REGISTRY_ENDPOINT": "@secret/container-registry/endpoint?"
"KUBEPKG_REMOTE_REGISTRY_USERNAME": "@secret/container-registry/username?"
"KUBEPKG_REMOTE_REGISTRY_PASSWORD": "@secret/container-registry/password?"
}
}
},
]
}
}
registry: kubepkgtool.#ApplyToDashboard & {
target: group: "system"
kubepkg: kubepkgcomponent.#ContainerRegistry & {
spec: version: pkg.version.output
}
}
}
1 change: 1 addition & 0 deletions webapp/dashboard/src/account/AccountAutocomplete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const useAccountAutocomplete = ({
const listAccount$ = useRequest(listAccount);
const options$ = useStateSubject([] as AccountUser[]);


useEpics(
options$,
() =>
Expand Down

0 comments on commit f834b80

Please sign in to comment.