Skip to content

Commit

Permalink
refactor: valid8or -> validator (#67)
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>
  • Loading branch information
TylerGillson authored Oct 20, 2023
1 parent 6f79f8a commit ff88026
Show file tree
Hide file tree
Showing 62 changed files with 400 additions and 400 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:

env:
GO_VERSION: "~1.20"
IMAGE_NAME: "valid8or"
IMAGE_NAME: "validator"
defaults:
run:
shell: bash
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
DATETIME: ${{ needs.prepare_ci_run.outputs.DATETIME }}
BUILD_TIME: ${{ needs.prepare_ci_run.outputs.BUILD_TIME }}
GIT_SHA: ${{ needs.prepare_ci_run.outputs.GIT_SHA }}
RELEASE_REGISTRY: "localhost:5000/valid8or"
RELEASE_REGISTRY: "localhost:5000/validator"
steps:
- name: Check out code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ jobs:
packages: write
id-token: write
env:
IMAGE_TAG: quay.io/spectrocloud-labs/valid8or:${{ needs.release-please.outputs.tag_name }}
IMAGE_NAME: valid8or
IMAGE_TAG: quay.io/spectrocloud-labs/validator:${{ needs.release-please.outputs.tag_name }}
IMAGE_NAME: validator
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
Expand Down
122 changes: 61 additions & 61 deletions CHANGELOG.md

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

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

# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
Expand Down Expand Up @@ -183,15 +183,15 @@ $(HELMIFY): $(LOCALBIN)
helm-build: helm helmify manifests kustomize
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG) && cd ../../
$(KUSTOMIZE) build config/default | $(HELMIFY) -crd-dir
cat hack/extra-values.yaml >> chart/valid8or/values.yaml
cat hack/extra-values.yaml >> chart/validator/values.yaml

.PHONY: helm-package
helm-package: generate manifests
$(HELM) package --version $(CHART_VERSION) chart/valid8or/
mkdir -p charts && mv valid8or-*.tgz charts
$(HELM) repo index --url https://spectrocloud-labs.github.io/valid8or ./chart
mv charts/valid8or/index.yaml index.yaml
$(HELM) package --version $(CHART_VERSION) chart/validator/
mkdir -p charts && mv validator-*.tgz charts
$(HELM) repo index --url https://spectrocloud-labs.github.io/validator ./chart
mv charts/validator/index.yaml index.yaml

.PHONY: frigate
frigate:
frigate gen chart/valid8or --no-deps -o markdown > chart/valid8or/README.md
frigate gen chart/validator --no-deps -o markdown > chart/validator/README.md
10 changes: 5 additions & 5 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
domain: spectrocloud.labs
layout:
- go.kubebuilder.io/v4
projectName: valid8or
repo: github.com/spectrocloud-labs/valid8or
projectName: validator
repo: github.com/spectrocloud-labs/validator
resources:
- api:
crdVersion: v1
Expand All @@ -15,15 +15,15 @@ resources:
domain: spectrocloud.labs
group: validation
kind: ValidationResult
path: github.com/spectrocloud-labs/valid8or/api/v1alpha1
path: github.com/spectrocloud-labs/validator/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
namespaced: true
controller: true
domain: spectrocloud.labs
group: validation
kind: Valid8orConfig
path: github.com/spectrocloud-labs/valid8or/api/v1alpha1
kind: ValidatorConfig
path: github.com/spectrocloud-labs/validator/api/v1alpha1
version: v1alpha1
version: "3"
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# valid8or
valid8or (AKA Validation Controller) monitors ValidationResults created by one or more valid8or plugins and uploads them to a sink of your choosing, e.g., Slack or Spectro Cloud Palette.
<img width="1364" alt="image" src="https://github.com/spectrocloud-labs/valid8or/assets/1795270/e68dfdf5-25bf-4336-ad87-f783c4825c7e">
# validator
validator (AKA Validation Controller) monitors ValidationResults created by one or more validator plugins and uploads them to a sink of your choosing, e.g., Slack or Spectro Cloud Palette.
<img width="1364" alt="image" src="https://github.com/spectrocloud-labs/validator/assets/1795270/e68dfdf5-25bf-4336-ad87-f783c4825c7e">

## Description
The valid8or repository is fairly minimal - all the heavy lifting is done by the valid8or plugins. Installation of valid8or and one or more plugins is accomplished via Helm.
The validator repository is fairly minimal - all the heavy lifting is done by the validator plugins. Installation of validator and one or more plugins is accomplished via Helm.

Plugins:
- [AWS](https://github.com/spectrocloud-labs/valid8or-plugin-aws)
- [Network](https://github.com/spectrocloud-labs/valid8or-plugin-network)
- [vSphere](https://github.com/spectrocloud-labs/valid8or-plugin-vsphere)
- [AWS](https://github.com/spectrocloud-labs/validator-plugin-aws)
- [Network](https://github.com/spectrocloud-labs/validator-plugin-network)
- [vSphere](https://github.com/spectrocloud-labs/validator-plugin-vsphere)

## Installation
```bash
helm repo add valid8or https://spectrocloud-labs.github.io/valid8or/
helm repo add validator https://spectrocloud-labs.github.io/validator/
helm repo update
helm install valid8or valid8or/valid8or -n valid8or --create-namespace
helm install validator validator/validator -n validator --create-namespace
```

## Getting Started
Expand All @@ -31,13 +31,13 @@ kubectl apply -f config/samples/
2. Build and push your image to the location specified by `IMG`:

```sh
make docker-build docker-push IMG=<some-registry>/valid8or:tag
make docker-build docker-push IMG=<some-registry>/validator:tag
```

3. Deploy the controller to the cluster with the image specified by `IMG`:

```sh
make deploy IMG=<some-registry>/valid8or:tag
make deploy IMG=<some-registry>/validator:tag
```

### Uninstall CRDs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// Valid8orConfigSpec defines the desired state of Valid8orConfig
type Valid8orConfigSpec struct {
// ValidatorConfigSpec defines the desired state of ValidatorConfig
type ValidatorConfigSpec struct {
Plugins []HelmRelease `json:"plugins,omitempty"`
}

Expand All @@ -37,22 +37,22 @@ type HelmChart struct {
Version string `json:"version"`
}

// Valid8orConfigStatus defines the observed state of Valid8orConfig
type Valid8orConfigStatus struct {
// ValidatorConfigStatus defines the observed state of ValidatorConfig
type ValidatorConfigStatus struct {
// +optional
// +patchMergeKey=type
// +patchStrategy=merge
Conditions []Valid8orPluginCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
Conditions []ValidatorPluginCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
}

type Valid8orPluginCondition struct {
type ValidatorPluginCondition struct {
// Type of condition in CamelCase or in foo.example.com/CamelCase.
// Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
// can be useful (see .node.status.conditions), the ability to deconflict is important.
// +required
Type ConditionType `json:"type"`

// Name of the Valid8or plugin.
// Name of the Validator plugin.
// +required
PluginName string `json:"pluginName"`

Expand Down Expand Up @@ -81,24 +81,24 @@ const HelmChartDeployedCondition ConditionType = "HelmChartDeployed"
//+kubebuilder:object:root=true
//+kubebuilder:subresource:status

// Valid8orConfig is the Schema for the valid8orconfigs API
type Valid8orConfig struct {
// ValidatorConfig is the Schema for the validatorconfigs API
type ValidatorConfig struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec Valid8orConfigSpec `json:"spec,omitempty"`
Status Valid8orConfigStatus `json:"status,omitempty"`
Spec ValidatorConfigSpec `json:"spec,omitempty"`
Status ValidatorConfigStatus `json:"status,omitempty"`
}

//+kubebuilder:object:root=true

// Valid8orConfigList contains a list of Valid8orConfig
type Valid8orConfigList struct {
// ValidatorConfigList contains a list of ValidatorConfig
type ValidatorConfigList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Valid8orConfig `json:"items"`
Items []ValidatorConfig `json:"items"`
}

func init() {
SchemeBuilder.Register(&Valid8orConfig{}, &Valid8orConfigList{})
SchemeBuilder.Register(&ValidatorConfig{}, &ValidatorConfigList{})
}
Loading

0 comments on commit ff88026

Please sign in to comment.