diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index 2d41ab4..d247a71 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -21,7 +21,7 @@ jobs: go-version-file: go.mod - name: Install Task - uses: arduino/setup-task@v2 + uses: go-task/setup-task@v2 with: version: 3.x diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index bd2b5f6..4769197 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -14,21 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - - uses: actions/setup-python@v6 - with: - cache: pip - python-version: 3.x - - run: pip install -r requirements.txt - uses: actions/setup-go@v6 with: go-version-file: go.mod - - uses: golangci/golangci-lint-action@v9 - with: - version: latest - install-only: true - - run: go install golang.org/x/tools/cmd/goimports@latest - - uses: actions/cache@v5 - with: - path: ~/.cache/pre-commit - key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }} - - run: pre-commit run --all-files + - uses: j178/prek-action@v2 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 42ab60d..11d9788 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -12,11 +12,11 @@ jobs: release-please: runs-on: ubuntu-latest steps: - - uses: actions/create-github-app-token@v2 + - uses: actions/create-github-app-token@v3 id: app-token with: - app-id: ${{ secrets.APP_ID }} - private-key: ${{ secrets.APP_PRIVATE_KEY }} + app-id: ${{ secrets.DEVSY_GITHUB_APP_ID }} + private-key: ${{ secrets.DEVSY_GITHUB_APP_PRIVATE_KEY }} - uses: googleapis/release-please-action@v4 id: release with: diff --git a/.github/workflows/workflow-approval.yml b/.github/workflows/workflow-approval.yml index 13bbbb7..d140990 100644 --- a/.github/workflows/workflow-approval.yml +++ b/.github/workflows/workflow-approval.yml @@ -10,7 +10,12 @@ jobs: name: Approve Workflows runs-on: ubuntu-latest steps: - - uses: mheap/automatic-approve-action@v1 + - uses: actions/create-github-app-token@v3 + id: app-token with: - token: ${{ secrets.GH_ACCESS_TOKEN }} + app-id: ${{ secrets.DEVSY_GITHUB_APP_ID }} + private-key: ${{ secrets.DEVSY_GITHUB_APP_PRIVATE_KEY }} + - uses: skevetter/automatic-approve-action@v1 + with: + token: ${{ steps.app-token.outputs.token }} workflows: "commit.yml,lint.yml,pre-commit.yml" diff --git a/README.md b/README.md index d2e7c14..280d980 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # admin-apis -Go library providing shared API types and license definitions for the [DevPod](https://github.com/skevetter/devpod) ecosystem. +Go library providing shared API types and license definitions for the [Devsy](https://github.com/devsy-org/devsy) ecosystem. ## Prerequisites diff --git a/definitions/features.yaml b/definitions/features.yaml index 94f2e6f..ff9fa87 100644 --- a/definitions/features.yaml +++ b/definitions/features.yaml @@ -368,7 +368,7 @@ features: module: "devsy-pro-distro" description: "Isolated Control Plane optimizes resource allocation and security by splitting up the control plane and worker Devsy into separate clusters. " docsLink: "https://www.vcluster.com/docs/vcluster/configure/vcluster-yaml/experimental/isolated-control-plane" -- name: "devpod" +- name: "devsy" displayName: "Dev Environment Management" module: "dev-environments" preview: true diff --git a/definitions/generated/modules_generated.yaml b/definitions/generated/modules_generated.yaml index 802a48e..18a95c3 100644 --- a/definitions/generated/modules_generated.yaml +++ b/definitions/generated/modules_generated.yaml @@ -38,10 +38,10 @@ modules: name: deployment-modes - displayName: Dev Environments features: - - devpod + - devsy limits: - displayName: Dev Environments - name: devpod-workspace-instance + name: devsy-workspace-instance name: dev-environments - displayName: Devsy features: diff --git a/definitions/modules.yaml b/definitions/modules.yaml index fd18053..6fc1768 100644 --- a/definitions/modules.yaml +++ b/definitions/modules.yaml @@ -64,5 +64,5 @@ modules: - name: "dev-environments" displayName: "Dev Environments" limits: - - name: devpod-workspace-instance + - name: devsy-workspace-instance displayName: "Dev Environments" diff --git a/pkg/licenseapi/features.go b/pkg/licenseapi/features.go index ce5b036..65fdad2 100644 --- a/pkg/licenseapi/features.go +++ b/pkg/licenseapi/features.go @@ -146,7 +146,7 @@ const ( DevsyDistroIsolatedControlPlane FeatureName = "devsy-distro-isolated-cp" // Isolated Control Plane - Devpod FeatureName = "devpod" // Dev Environment Management + Devsy FeatureName = "devsy" // Dev Environment Management ) @@ -223,7 +223,7 @@ func GetFeatures() []FeatureName { SecretEncryption, DevsyDistroAdmissionControl, DevsyDistroIsolatedControlPlane, - Devpod, + Devsy, } } @@ -586,7 +586,7 @@ func GetAllFeatures() []*Feature { }, { DisplayName: "Dev Environment Management", - Name: "devpod", + Name: "devsy", Module: "dev-environments", }, } diff --git a/pkg/licenseapi/license_limit.go b/pkg/licenseapi/license_limit.go index ad38b00..e3d3ffc 100644 --- a/pkg/licenseapi/license_limit.go +++ b/pkg/licenseapi/license_limit.go @@ -13,9 +13,9 @@ var Limits = map[ResourceName]*Limit{ DisplayName: "Virtual Clusters (HA)", Name: string(DevsyClusterInstanceHALimit), }, - DevPodWorkspaceInstanceLimit: { + DevsyWorkspaceInstanceLimit: { DisplayName: "Dev Environments", - Name: string(DevPodWorkspaceInstanceLimit), + Name: string(DevsyWorkspaceInstanceLimit), }, UserLimit: { DisplayName: "Users", diff --git a/pkg/licenseapi/names.go b/pkg/licenseapi/names.go index edfb649..b7dadf4 100644 --- a/pkg/licenseapi/names.go +++ b/pkg/licenseapi/names.go @@ -36,9 +36,8 @@ const ( // Products const ( /* NEVER CHANGE ANY OF THESE */ - Devsy ProductName = "devsy" - DevsyPro ProductName = "devsy-pro" - DevPodPro ProductName = "devpod-pro" + DevsyOrg ProductName = "devsy" + DevsyPro ProductName = "devsy-pro" ) // Modules @@ -47,7 +46,6 @@ const ( KubernetesClusterModule ModuleName = "k8s-clusters" DevsyModule ModuleName = "devsy" DevsyProDistroModule ModuleName = "devsy-pro-distro" - DevPodModule ModuleName = "devpod" AuthModule ModuleName = "auth" TemplatingModule ModuleName = "templating" SecretsModule ModuleName = "secrets" @@ -78,13 +76,13 @@ const ( // Resources (e.g. for limits) const ( /* NEVER CHANGE ANY OF THESE */ - ConnectedClusterLimit ResourceName = "connected-cluster" - DevsyClusterInstanceLimit ResourceName = "virtual-cluster-instance" - DevsyClusterInstanceHALimit ResourceName = "virtual-cluster-instance-ha" - SpaceInstanceLimit ResourceName = "space-instance" - DevPodWorkspaceInstanceLimit ResourceName = "devpod-workspace-instance" - UserLimit ResourceName = "user" - InstanceLimit ResourceName = "instance" + ConnectedClusterLimit ResourceName = "connected-cluster" + DevsyClusterInstanceLimit ResourceName = "virtual-cluster-instance" + DevsyClusterInstanceHALimit ResourceName = "virtual-cluster-instance-ha" + SpaceInstanceLimit ResourceName = "space-instance" + DevsyWorkspaceInstanceLimit ResourceName = "devsy-workspace-instance" + UserLimit ResourceName = "user" + InstanceLimit ResourceName = "instance" ) // Resource Status diff --git a/pkg/licenseapi/request_instance.go b/pkg/licenseapi/request_instance.go index bdefd9a..c40886e 100644 --- a/pkg/licenseapi/request_instance.go +++ b/pkg/licenseapi/request_instance.go @@ -14,7 +14,7 @@ const ( type InstanceCreateInput struct { *InstanceTokenAuth `json:",inline" hash:"-"` - // Product is the product that is being used. Can be empty, devsy, devpod-pro or devsy-pro. + // Product is the product that is being used. Can be empty, devsy or devsy-pro. // This should NOT be a ProductName but a string to allow for downward compatibility Product string `json:"product,omitempty" form:"product"` diff --git a/pkg/licenseapi/zz_generated.openapi.go b/pkg/licenseapi/zz_generated.openapi.go index 152cfef..df9f00e 100644 --- a/pkg/licenseapi/zz_generated.openapi.go +++ b/pkg/licenseapi/zz_generated.openapi.go @@ -603,7 +603,7 @@ func schema_skevetter_admin_apis_pkg_licenseapi_InstanceCreateInput(ref common.R }, "product": { SchemaProps: spec.SchemaProps{ - Description: "Product is the product that is being used. Can be empty, devsy, devpod-pro or devsy-pro. This should NOT be a ProductName but a string to allow for downward compatibility", + Description: "Product is the product that is being used. Can be empty, devsy or devsy-pro. This should NOT be a ProductName but a string to allow for downward compatibility", Type: []string{"string"}, Format: "", },