Skip to content

chore: update harbor client to 2.13.0 #238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Jun 13, 2025
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
8 changes: 4 additions & 4 deletions package-lock.json

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

22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@kubernetes/client-node": "1.1.2",
"@linode/apl-k8s-operator": "0.1.0",
"@linode/gitea-client-node": "1.23.6",
"@linode/harbor-client-node": "^2.2.1",
"@linode/harbor-client-node": "^2.13.0",
"@linode/keycloak-client-node": "^26.1.5",
"async-retry": "^1.3.3",
"aws-sdk": "2.1692.0",
Expand Down Expand Up @@ -91,7 +91,7 @@
"package-lock.json": "npm install --prefer-offline --no-audit"
},
"scripts": {
"build": "tsc",
"build": "tsc && cp src/operators/harbor/harbor-full-robot-system-permissions.json dist/src/operators/harbor/",
"cz:retry": "git-cz --retry",
"cz": "git-cz",
"lint-staged": "lint-staged",
Expand All @@ -111,14 +111,14 @@
"tasks:otomi-chart": "node dist/src/tasks/otomi/otomi-chart.js",
"tasks:wait-for-dev": "NODE_TLS_REJECT_UNAUTHORIZED=0 tsx ./src/tasks/otomi/wait-for.ts",
"tasks:wait-for": "node dist/src/tasks/otomi/wait-for.js",
"operator:secrets-dev": "NODE_TLS_REJECT_UNAUTHORIZED=0 tsx ./src/operator/secrets.ts",
"operator:secrets": "node dist/src/operator/secrets.js",
"operator:gitea-dev": "NODE_TLS_REJECT_UNAUTHORIZED=0 tsx ./src/operator/gitea.ts",
"operator:gitea": "node dist/src/operator/gitea.js",
"operator:harbor-dev": "NODE_TLS_REJECT_UNAUTHORIZED=0 tsx ./src/operator/harbor.ts",
"operator:harbor": "node dist/src/operator/harbor.js",
"operator:keycloak-dev": "NODE_TLS_REJECT_UNAUTHORIZED=0 tsx ./src/operator/keycloak.ts",
"operator:keycloak": "node dist/src/operator/keycloak.js",
"operator:secrets-dev": "NODE_TLS_REJECT_UNAUTHORIZED=0 tsx ./src/operators/secrets/secrets.ts",
"operator:secrets": "node dist/src/operators/secrets/secrets.js",
"operator:gitea-dev": "NODE_TLS_REJECT_UNAUTHORIZED=0 tsx ./src/operators/gitea/gitea.ts",
"operator:gitea": "node dist/src/operators/gitea/gitea.js",
"operator:harbor-dev": "NODE_TLS_REJECT_UNAUTHORIZED=0 tsx ./src/operators/harbor/harbor.ts",
"operator:harbor": "node dist/src/operators/harbor/harbor.js",
"operator:keycloak-dev": "NODE_TLS_REJECT_UNAUTHORIZED=0 tsx ./src/operators/keycloak/keycloak.ts",
"operator:keycloak": "node dist/src/operators/keycloak/keycloak.js",
"test": "NODE_ENV=test jest"
},
"standard-version": {
Expand All @@ -127,4 +127,4 @@
}
},
"version": "3.11.0"
}
}
2 changes: 1 addition & 1 deletion src/k8s.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
} from '@kubernetes/client-node'
import { IncomingMessage } from 'http'
import { findIndex, mapValues } from 'lodash'
import { PipelineKubernetesObject } from './operator/gitea'
import { PipelineKubernetesObject } from './operators/gitea/gitea'

let kc: KubeConfig
let coreClient: CoreV1Api
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { EditHookOption, Organization, Team, User } from '@linode/gitea-client-node/'
import * as giteaUtils from '../gitea-utils'
import { getRepoNameFromUrl } from '../gitea-utils'
import * as utils from '../utils'
import * as giteaUtils from '../../gitea-utils'
import { getRepoNameFromUrl } from '../../gitea-utils'
import * as utils from '../../utils'
import * as giteaOperator from './gitea'

describe('giteaOperator', () => {
Expand Down
10 changes: 5 additions & 5 deletions src/operator/gitea.ts → src/operators/gitea/gitea.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import retry from 'async-retry'
import { generate as generatePassword } from 'generate-password'
import { isEmpty, keys } from 'lodash'
import stream from 'stream'
import { getRepoNameFromUrl, setServiceAccountSecret } from '../gitea-utils'
import { getTektonPipeline } from '../k8s'
import { doApiCall, getSanitizedErrorMessage } from '../utils'
import { getRepoNameFromUrl, setServiceAccountSecret } from '../../gitea-utils'
import { getTektonPipeline } from '../../k8s'
import { doApiCall, getSanitizedErrorMessage } from '../../utils'
import {
CHECK_OIDC_CONFIG_INTERVAL,
cleanEnv,
Expand All @@ -34,8 +34,8 @@ import {
GITEA_URL_PORT,
MIN_TIMEOUT,
RETRIES,
} from '../validators'
import { orgName, otomiChartsRepoName, otomiValuesRepoName, teamNameOwners, teamNameViewer, username } from './common'
} from '../../validators'
import { orgName, otomiChartsRepoName, otomiValuesRepoName, teamNameOwners, teamNameViewer, username } from '../common'

// Interfaces
interface hookInfo {
Expand Down
72 changes: 72 additions & 0 deletions src/operators/harbor/harbor-full-robot-system-permissions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
[
{ "resource": "garbage-collection", "action": "create" },
{ "resource": "label", "action": "create" },
{ "resource": "ldap-user", "action": "create" },
{ "resource": "preheat-instance", "action": "create" },
{ "resource": "project", "action": "create" },
{ "resource": "purge-audit", "action": "create" },
{ "resource": "registry", "action": "create" },
{ "resource": "replication", "action": "create" },
{ "resource": "replication-policy", "action": "create" },
{ "resource": "robot", "action": "create" },
{ "resource": "scan-all", "action": "create" },
{ "resource": "scanner", "action": "create" },
{ "resource": "user", "action": "create" },
{ "resource": "user-group", "action": "create" },
{ "resource": "label", "action": "delete" },
{ "resource": "preheat-instance", "action": "delete" },
{ "resource": "registry", "action": "delete" },
{ "resource": "replication-policy", "action": "delete" },
{ "resource": "robot", "action": "delete" },
{ "resource": "scanner", "action": "delete" },
{ "resource": "user", "action": "delete" },
{ "resource": "user-group", "action": "delete" },
{ "resource": "audit-log", "action": "list" },
{ "resource": "garbage-collection", "action": "list" },
{ "resource": "jobservice-monitor", "action": "list" },
{ "resource": "ldap-user", "action": "list" },
{ "resource": "preheat-instance", "action": "list" },
{ "resource": "project", "action": "list" },
{ "resource": "purge-audit", "action": "list" },
{ "resource": "quota", "action": "list" },
{ "resource": "registry", "action": "list" },
{ "resource": "replication", "action": "list" },
{ "resource": "replication-adapter", "action": "list" },
{ "resource": "replication-policy", "action": "list" },
{ "resource": "robot", "action": "list" },
{ "resource": "scanner", "action": "list" },
{ "resource": "security-hub", "action": "list" },
{ "resource": "user", "action": "list" },
{ "resource": "user-group", "action": "list" },
{ "resource": "catalog", "action": "read" },
{ "resource": "garbage-collection", "action": "read" },
{ "resource": "label", "action": "read" },
{ "resource": "preheat-instance", "action": "read" },
{ "resource": "purge-audit", "action": "read" },
{ "resource": "quota", "action": "read" },
{ "resource": "registry", "action": "read" },
{ "resource": "replication", "action": "read" },
{ "resource": "replication-policy", "action": "read" },
{ "resource": "robot", "action": "read" },
{ "resource": "scan-all", "action": "read" },
{ "resource": "scanner", "action": "read" },
{ "resource": "security-hub", "action": "read" },
{ "resource": "system-volumes", "action": "read" },
{ "resource": "user", "action": "read" },
{ "resource": "user-group", "action": "read" },
{ "resource": "garbage-collection", "action": "stop" },
{ "resource": "jobservice-monitor", "action": "stop" },
{ "resource": "purge-audit", "action": "stop" },
{ "resource": "scan-all", "action": "stop" },
{ "resource": "garbage-collection", "action": "update" },
{ "resource": "label", "action": "update" },
{ "resource": "preheat-instance", "action": "update" },
{ "resource": "purge-audit", "action": "update" },
{ "resource": "quota", "action": "update" },
{ "resource": "registry", "action": "update" },
{ "resource": "replication-policy", "action": "update" },
{ "resource": "scan-all", "action": "update" },
{ "resource": "scanner", "action": "update" },
{ "resource": "user", "action": "update" },
{ "resource": "user-group", "action": "update" }
]
Loading
Loading