Skip to content

Commit

Permalink
chore: migrate from spectrocloud-labs to validator-labs (#65)
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Gillson <[email protected]>
  • Loading branch information
TylerGillson authored May 17, 2024
1 parent c30d23b commit 6644720
Show file tree
Hide file tree
Showing 21 changed files with 142 additions and 144 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# the repo. Unless a later match takes precedence,
# @global-owner1 and @global-owner2 will be requested for
# review when someone opens a pull request.
* @spectrocloud-labs/validator
* @validator-labs/validator
2 changes: 1 addition & 1 deletion .github/workflows/bulwark-gitleaks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
shell: sh
env:
BRANCH: ${{ github.head_ref || github.ref_name }}
run: /workspace/bulwark -name CodeSASTGitLeaks -organization spectrocloud-labs -target $REPO -tags "branch:$BRANCH,options:--log-opts origin..HEAD"
run: /workspace/bulwark -name CodeSASTGitLeaks -organization validator-labs -target $REPO -tags "branch:$BRANCH,options:--log-opts origin..HEAD"

- name: check-result
shell: sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bulwark-gosec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
env:
BRANCH: ${{ github.head_ref || github.ref_name }}
GO111MODULE: on
run: /workspace/bulwark -name CodeSASTGoSec -verbose -organization spectrocloud-labs -target $REPO -tags "branch:$BRANCH"
run: /workspace/bulwark -name CodeSASTGoSec -verbose -organization validator-labs -target $REPO -tags "branch:$BRANCH"

- name: check-result
shell: sh
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@ jobs:
- name: Checkout
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4

- uses: google-github-actions/release-please-action@e4dc86ba9405554aeba3c6bb2d169500e7d3b4ee # v4
- uses: googleapis/release-please-action@v4
id: release
with:
command: manifest
token: ${{secrets.PAT}}
default-branch: main

release-charts:
needs: release-please
Expand All @@ -49,10 +47,10 @@ jobs:
with:
token: ${{ secrets.PAT }}
charts_dir: chart
owner: spectrocloud-labs
owner: validator-labs
branch: ${{ env.GITHUB_PAGES_BRANCH }}
commit_username: spectrocloud-labs-bot
commit_email: bot@noreply.spectrocloud-labs.io
commit_username: validator-labs-bot
commit_email: bot@noreply.validator-labs.io

build-container:
if: needs.release-please.outputs.releases_created == 'true'
Expand All @@ -64,7 +62,7 @@ jobs:
packages: write
id-token: write
env:
IMAGE_TAG: quay.io/spectrocloud-labs/validator-plugin-maas:${{ needs.release-please.outputs.tag_name }}
IMAGE_TAG: quay.io/validator-labs/validator-plugin-maas:${{ needs.release-please.outputs.tag_name }}
IMAGE_NAME: validator-plugin-maas
steps:
- name: Checkout
Expand All @@ -80,7 +78,7 @@ jobs:
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3
with:
registry: "quay.io"
username: tgillson
username: ${{ secrets.QUAY_USER }}
password: ${{ secrets.QUAY_TOKEN }}

- name: Build Docker Image
Expand Down
174 changes: 87 additions & 87 deletions CHANGELOG.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ endif

PLUGIN_NAME := maas
# Image URL to use all building/pushing image targets
IMG ?= quay.io/spectrocloud-labs/validator-plugin-maas:latest
IMG ?= quay.io/validator-labs/validator-plugin-maas:latest

GOARCH ?= $(shell go env GOARCH)

Expand Down Expand Up @@ -75,7 +75,7 @@ test: manifests generate fmt vet envtest setup-validator ## Run tests.
.PHONY: setup-validator
setup-validator:
@if [ ! -d ../validator ]; then \
git clone https://github.com/spectrocloud-labs/validator ../validator; \
git clone https://github.com/validator-labs/validator ../validator; \
fi

.PHONY: dev
Expand Down Expand Up @@ -210,7 +210,7 @@ helm-package: CHART_VERSION=v0.0.1 # x-release-please-version
helm-package: generate manifests
$(HELM) package --version $(CHART_VERSION) chart/validator-plugin-maas/
mkdir -p charts && mv validator-*.tgz charts
$(HELM) repo index --url https://spectrocloud-labs.github.io/validator-plugin-mass ./chart
$(HELM) repo index --url https://validator-labs.github.io/validator-plugin-mass ./chart
mv charts/validator-plugin-maas/index.yaml index.yaml

.PHONY: frigate
Expand Down
4 changes: 2 additions & 2 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ domain: spectrocloud.labs
layout:
- go.kubebuilder.io/v4
projectName: validator-plugin-maas
repo: github.com/spectrocloud-labs/validator-plugin-maas
repo: github.com/validator-labs/validator-plugin-maas
resources:
- api:
crdVersion: v1
Expand All @@ -15,6 +15,6 @@ resources:
domain: spectrocloud.labs
group: validation
kind: MaasValidator
path: github.com/spectrocloud-labs/validator-plugin-maas/api/v1alpha1
path: github.com/validator-labs/validator-plugin-maas/api/v1alpha1
version: v1alpha1
version: "3"
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/spectrocloud-labs/validator-plugin-maas/issues)
[![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/validator-labs/validator-plugin-maas/issues)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
![Test](https://github.com/spectrocloud-labs/validator-plugin-maas/actions/workflows/test.yaml/badge.svg)
[![Go Report Card](https://goreportcard.com/badge/github.com/spectrocloud-labs/validator-plugin-maas)](https://goreportcard.com/report/github.com/spectrocloud-labs/validator-plugin-maas)
[![codecov](https://codecov.io/github/spectrocloud-labs/validator-plugin-maas/graph/badge.svg?token=Q15XUCRNCN)](https://codecov.io/github/spectrocloud-labs/validator-plugin-maas)
[![Go Reference](https://pkg.go.dev/badge/github.com/spectrocloud-labs/validator-plugin-maas.svg)](https://pkg.go.dev/github.com/spectrocloud-labs/validator-plugin-maas)
![Test](https://github.com/validator-labs/validator-plugin-maas/actions/workflows/test.yaml/badge.svg)
[![Go Report Card](https://goreportcard.com/badge/github.com/validator-labs/validator-plugin-maas)](https://goreportcard.com/report/github.com/validator-labs/validator-plugin-maas)
[![codecov](https://codecov.io/github/validator-labs/validator-plugin-maas/graph/badge.svg?token=Q15XUCRNCN)](https://codecov.io/github/validator-labs/validator-plugin-maas)
[![Go Reference](https://pkg.go.dev/badge/github.com/validator-labs/validator-plugin-maas.svg)](https://pkg.go.dev/github.com/validator-labs/validator-plugin-maas)

# validator-plugin-maas
The MaaS [validator](https://github.com/spectrocloud-labs/validator) plugin ensures that your MaaS configuration matches a user-configurable expected state.
The MaaS [validator](https://github.com/validator-labs/validator) plugin ensures that your MaaS configuration matches a user-configurable expected state.

## Description

Expand All @@ -20,13 +20,13 @@ The MaaS validator plugin reconciles `MaasValidator` custom resources to perform

Each `MaasValidator` CR is (re)-processed every two minutes to continuously ensure that your MaaS instance matches the expected state.

See the [samples](https://github.com/spectrocloud-labs/validator-plugin-maas/tree/main/config/samples) directory for example `MaasValidator` configurations.
See the [samples](https://github.com/validator-labs/validator-plugin-maas/tree/main/config/samples) directory for example `MaasValidator` configurations.

## Installation
The MaaS validator plugin is meant to be [installed by validator](https://github.com/spectrocloud-labs/validator/tree/gh_pages#installation) (via a ValidatorConfig), but it can also be installed directly as follows:
The MaaS validator plugin is meant to be [installed by validator](https://github.com/validator-labs/validator/tree/gh_pages#installation) (via a ValidatorConfig), but it can also be installed directly as follows:

```bash
helm repo add validator-plugin-maas https://spectrocloud-labs.github.io/validator-plugin-maas
helm repo add validator-plugin-maas https://validator-labs.github.io/validator-plugin-maas
helm repo update
helm install validator-plugin-maas validator-plugin-maas/validator-plugin-maas -n validator-plugin-maas --create-namespace
```
Expand Down
4 changes: 2 additions & 2 deletions chart/validator-plugin-maas/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The following table lists the configurable parameters of the validator-plugin-ma
| `controllerManager.manager.args` | | `["--health-probe-bind-address=:8081", "--leader-elect"]` |
| `controllerManager.manager.containerSecurityContext.allowPrivilegeEscalation` | | `false` |
| `controllerManager.manager.containerSecurityContext.capabilities.drop` | | `["ALL"]` |
| `controllerManager.manager.image.repository` | | `"quay.io/spectrocloud-labs/validator-plugin-maas"` |
| `controllerManager.manager.image.repository` | | `"quay.io/validator-labs/validator-plugin-maas"` |
| `controllerManager.manager.image.tag` | x-release-please-version | `"v0.0.3"` |
| `controllerManager.manager.resources.limits.cpu` | | `"500m"` |
| `controllerManager.manager.resources.limits.memory` | | `"128Mi"` |
Expand All @@ -36,7 +36,7 @@ The following table lists the configurable parameters of the validator-plugin-ma
| `metricsService.type` | | `"ClusterIP"` |
| `env` | | `[]` |
| `proxy.enabled` | | `false` |
| `proxy.image` | | `"quay.io/spectrocloud-labs/validator-certs-init:latest"` |
| `proxy.image` | | `"quay.io/validator-labs/validator-certs-init:latest"` |
| `proxy.secretName` | | `"proxy-cert"` |


Expand Down
4 changes: 2 additions & 2 deletions chart/validator-plugin-maas/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ controllerManager:
drop:
- ALL
image:
repository: quay.io/spectrocloud-labs/validator-plugin-maas
repository: quay.io/validator-labs/validator-plugin-maas
tag: v0.0.3 # x-release-please-version
resources:
limits:
Expand Down Expand Up @@ -65,7 +65,7 @@ env: []
proxy:
enabled: false
# The image used by the init container. Must include the update-ca-certificates command.
image: quay.io/spectrocloud-labs/validator-certs-init:latest
image: quay.io/validator-labs/validator-certs-init:latest
# The name of a secret containing a proxy CA certificate.
# WARNING: the key whose value is the CA certificate must end with '.crt'.
secretName: proxy-cert
6 changes: 3 additions & 3 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ import (
"sigs.k8s.io/controller-runtime/pkg/healthz"
"sigs.k8s.io/controller-runtime/pkg/log/zap"

validationv1alpha1 "github.com/spectrocloud-labs/validator-plugin-maas/api/v1alpha1"
"github.com/spectrocloud-labs/validator-plugin-maas/internal/controller"
validatorv1alpha1 "github.com/spectrocloud-labs/validator/api/v1alpha1"
validationv1alpha1 "github.com/validator-labs/validator-plugin-maas/api/v1alpha1"
"github.com/validator-labs/validator-plugin-maas/internal/controller"
validatorv1alpha1 "github.com/validator-labs/validator/api/v1alpha1"
//+kubebuilder:scaffold:imports
)

Expand Down
2 changes: 1 addition & 1 deletion config/devspace/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ resources:
- ../default

images:
- name: quay.io/spectrocloud-labs/maas-validator:latest
- name: quay.io/validator-labs/maas-validator:latest
newTag: dev

patches:
Expand Down
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
images:
- name: controller
newName: quay.io/spectrocloud-labs/validator-plugin-maas
newName: quay.io/validator-labs/validator-plugin-maas
newTag: latest
2 changes: 1 addition & 1 deletion devspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ vars:
GOARCH:
command: go
args: ["env", "GOARCH"]
IMAGE: quay.io/spectrocloud-labs/validator-plugin-maas
IMAGE: quay.io/validator-labs/validator-plugin-maas

images:
validator-plugin-maas:
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/spectrocloud-labs/validator-plugin-maas
module github.com/validator-labs/validator-plugin-maas

go 1.21.7

Expand All @@ -8,8 +8,8 @@ require (
github.com/maas/gomaasclient v0.4.0
github.com/onsi/ginkgo/v2 v2.17.3
github.com/onsi/gomega v1.33.1
github.com/spectrocloud-labs/validator v0.0.38
github.com/stretchr/testify v1.9.0
github.com/validator-labs/validator v0.0.39
k8s.io/api v0.29.3
k8s.io/apimachinery v0.29.3
k8s.io/client-go v0.29.3
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,6 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8=
github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
github.com/spectrocloud-labs/validator v0.0.38 h1:cDuuc/qerjW4ix0CTPedomIVZ3RScbTsb38ZAUwntUs=
github.com/spectrocloud-labs/validator v0.0.38/go.mod h1:QDr5oOVbAGTtOJ+UdmLGL5nRD0mFoq7LV17clZu8Dw8=
github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0=
github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
Expand All @@ -249,6 +247,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/validator-labs/validator v0.0.39 h1:i68vIw7NcmG0KCL1gxK9Dku3o+AkklUcr4jkVtQDw9c=
github.com/validator-labs/validator v0.0.39/go.mod h1:9uxAbwBWCWG9aNvruLYW5sXPZNxi1F0fuNO0cDmLypk=
github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM=
github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
Expand Down
14 changes: 7 additions & 7 deletions internal/controller/maasvalidator_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"

"github.com/spectrocloud-labs/validator-plugin-maas/api/v1alpha1"
"github.com/spectrocloud-labs/validator-plugin-maas/internal/constants"
val "github.com/spectrocloud-labs/validator-plugin-maas/internal/validators"
vapi "github.com/spectrocloud-labs/validator/api/v1alpha1"
"github.com/spectrocloud-labs/validator/pkg/types"
"github.com/spectrocloud-labs/validator/pkg/util"
vres "github.com/spectrocloud-labs/validator/pkg/validationresult"
"github.com/validator-labs/validator-plugin-maas/api/v1alpha1"
"github.com/validator-labs/validator-plugin-maas/internal/constants"
val "github.com/validator-labs/validator-plugin-maas/internal/validators"
vapi "github.com/validator-labs/validator/api/v1alpha1"
"github.com/validator-labs/validator/pkg/types"
"github.com/validator-labs/validator/pkg/util"
vres "github.com/validator-labs/validator/pkg/validationresult"
)

// MaasValidatorReconciler reconciles a MaasValidator object
Expand Down
4 changes: 2 additions & 2 deletions internal/controller/maasvalidator_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (

// . "github.com/onsi/gomega"
//+kubebuilder:scaffold:imports
"github.com/spectrocloud-labs/validator-plugin-maas/api/v1alpha1"
vapi "github.com/spectrocloud-labs/validator/api/v1alpha1"
"github.com/validator-labs/validator-plugin-maas/api/v1alpha1"
vapi "github.com/validator-labs/validator/api/v1alpha1"
)

const MaasValidatorName = "maas-validator"
Expand Down
6 changes: 3 additions & 3 deletions internal/controller/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log/zap"
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"

v1alpha1 "github.com/spectrocloud-labs/validator-plugin-maas/api/v1alpha1"
vapi "github.com/spectrocloud-labs/validator/api/v1alpha1"
"github.com/spectrocloud-labs/validator/pkg/util"
v1alpha1 "github.com/validator-labs/validator-plugin-maas/api/v1alpha1"
vapi "github.com/validator-labs/validator/api/v1alpha1"
"github.com/validator-labs/validator/pkg/util"
//+kubebuilder:scaffold:imports
)

Expand Down
10 changes: 5 additions & 5 deletions internal/validators/maas_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
gomaasclient "github.com/maas/gomaasclient/client"
"github.com/maas/gomaasclient/entity"

"github.com/spectrocloud-labs/validator-plugin-maas/api/v1alpha1"
"github.com/spectrocloud-labs/validator-plugin-maas/internal/constants"
vapi "github.com/spectrocloud-labs/validator/api/v1alpha1"
"github.com/spectrocloud-labs/validator/pkg/types"
"github.com/spectrocloud-labs/validator/pkg/util"
"github.com/validator-labs/validator-plugin-maas/api/v1alpha1"
"github.com/validator-labs/validator-plugin-maas/internal/constants"
vapi "github.com/validator-labs/validator/api/v1alpha1"
"github.com/validator-labs/validator/pkg/types"
"github.com/validator-labs/validator/pkg/util"
)

const errMsg string = "failed to validate rule"
Expand Down
2 changes: 1 addition & 1 deletion internal/validators/maas_validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/maas/gomaasclient/entity"
"github.com/stretchr/testify/assert"

"github.com/spectrocloud-labs/validator-plugin-maas/api/v1alpha1"
"github.com/validator-labs/validator-plugin-maas/api/v1alpha1"
)

type DummyMaaSAPIClient struct {
Expand Down

0 comments on commit 6644720

Please sign in to comment.