Skip to content

Commit

Permalink
improved validation and cleanup of obsolete files
Browse files Browse the repository at this point in the history
Signed-off-by: Fotis Nikolaidis <nikolaidis.fotis@gmail.com>
  • Loading branch information
fnikolai committed Jun 30, 2023
1 parent add645d commit 9bc87ba
Show file tree
Hide file tree
Showing 34 changed files with 3,327 additions and 4,034 deletions.
1 change: 1 addition & 0 deletions .github/workflows/generate-chart-readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ jobs:
- name: Execute readme-generator-for-helm
run: |
pwd && ls -Rah
readme-generator-for-helm/bin/index.js -r $(cat prepared-inputs | grep README) -v $(cat prepared-inputs | grep values)
- name: Output generated README.md
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/test-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ jobs:

- name: Unit test
run: |
alias kubectl='microk8s kubectl'
alias helm='microk8s helm3'
snap alias microk8s.kubectl kubectl
snap alias microk8s.helm3 helm
# alias kubectl='microk8s kubectl'
# alias helm='microk8s helm3'
make test
24 changes: 20 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,36 @@

## Changes Since Last Release

### Changed defaults / behaviours
- ...

### New Features & Functionality
- Add autocompletion for uninstall command.
- Add validation for missing callable.
- ...

## Bug Fixes
- Remove VirtualObjects and Templates from the list of CRDs whose finalizers can be forcibly deleted (they have no finalizers).
- ...


## 1.0.42 \[2023-06-27\]

### Changed defaults / behaviours
- Moved charts from `charts/{category}` to `examples/apps`. This allows to have the apps and the test-cases on the same directory. Additionally, that
means that chart releasing is no longer part of the frisbee release -- which shouldn't have been the case in the first place.
- Renamed template to be in the format 'frisbee.system...' and 'frisbee.apps'. This, however, warrants a new release because
the renamed systems templates affect the controller.
means that chart releasing is no longer part of the frisbee release -- which shouldn't have been the case in the first place.
- Renamed template to be in the format 'frisbee.system...' and 'frisbee.apps'. This, however, warrants a new release because
the renamed systems templates affect the controller.
- ...

### New Features & Functionality
- ...

## Bug Fixes
- Stalled cached files were used in reporting. Update the cached files every time we run the report command.
- Stalled cached files were used in reporting. Update the cached files every time we run the report command.
- ...


## 1.0.41 \[2023-06-22\]

### Changed defaults / behaviours
Expand Down
14 changes: 12 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
# Build the Frisbee operator binary
FROM golang:1.19 as builder


ENV GOOS=linux
ENV GOARCH=amd64
ENV CGO_ENABLED=0
ENV GOPROXY=direct
ENV GOSUMDB=off

WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
# cache deps before building and copying source so that we don't need to re-download as much
# and so that source changes don't invalidate our downloaded layer
RUN go mod download
RUN go mod download

# go env -w GOPROXY=direct
#go env -w GOSUMDB=off

# Copy the go source
COPY ./cmd/manager/main.go main.go
Expand All @@ -16,7 +26,7 @@ COPY controllers/ controllers/
COPY pkg/ pkg/

# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o /manager main.go
RUN go build -a -o /manager main.go

# Use alpine as minimal base image to package the Frisbee operator binary
# We use a non-root user setup.
Expand Down
34 changes: 18 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,23 @@ To learn more about Frisbee, check the **[QuickStart](https://frisbee.dev/docs/q
our **[Website](https://frisbee.dev)**.


## Use-Cases and Testing Patterns

In declarative testing, a test scenario focuses on what to accomplish rather than on the imperative details of how to manipulate the state of an application under test and verify the final application state against an expected state.

This approach not make tests more *readable, maintainable, and reproducible*, but it also help devops in identifying testing patterns.

Here, you can see some testing patterns we have identified across different application domains.

👉 [Databases](./examples/patterns/databases)

👉 [Federated Learning](./examples/patterns/federated-learning)

👉 [HPC](./examples/patterns/hpc)

👉 [CI](./examples/patterns/ci)


## Getting Started


Expand Down Expand Up @@ -227,24 +244,9 @@ Finally, Frisbee provides an advanced functionality for auto-generating reports
kubectl-frisbee report test demo-326 ~/frisbee-reports --pdf --force
```

This will create report on `~/frisbee/reports` directory including the pdf from Grafana.


## Use-Cases and Testing Patterns

In declarative testing, a test scenario focuses on what to accomplish rather than on the imperative details of how to manipulate the state of an application under test and verify the final application state against an expected state.

This approach not make tests more *readable, maintainable, and reproducible*, but it also help devops in identifying testing patterns.

Here, you can see some testing patterns we have identified across different application domains.

👉 [Databases](./examples/patterns/databases)

👉 [Federated Learning](./examples/patterns/federated-learning)
This will create report on `~/frisbee-reports` directory including the pdf from Grafana.

👉 [HPC](./examples/patterns/hpc)

👉 [CI](./examples/patterns/ci)


## Features
Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/crd_call.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ type MatchOutputs struct {
type CallSpec struct {
// Callable is the name of the endpoint that will be called
// +kubebuilder:validation:minlength=1
Callable string `json:"callable,omitempty"`
Callable string `json:"callable"`

// Services is a list of services that will be stopped.
// +kubebuilder:validation:minimum=1
Expand Down
34 changes: 0 additions & 34 deletions api/v1alpha1/crd_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,40 +35,6 @@ type Service struct {
Status ServiceStatus `json:"status,omitempty"`
}

// NIC specifies the capabilities of the emulated network interface.
type NIC struct {
Rate string `json:"rate,omitempty"`

Latency string `json:"latency,omitempty"`
}

// Disk specifies the capabilities of the emulated storage device.
type Disk struct {
// ReadBPS limits read rate (bytes per second)
ReadBPS string `json:"readbps,omitempty"`

// ReadIOPS limits read rate (IO per second)
ReadIOPS string `json:"readiops,omitempty"`

// WriteBPS limits write rate (bytes per second)
WriteBPS string `json:"writebps,omitempty"`

// WriteIOPS limits write rate (IO per second)
WriteIOPS string `json:"writeiops,omitempty"`
}

// Resources specifies limitations as to how the container will access host resources.
type Resources struct {
// +optional
Memory string `json:"memory,omitempty"`
// +optional
CPU string `json:"cpu,omitempty"`
// +optional
NIC *NIC `json:"nic,omitempty"`
// +optional
Disk *Disk `json:"disk,omitempty"`
}

type SetField struct {
// Field is the path to the field whose value will be replaced.
// Examples: Containers.0.Ports.0
Expand Down
55 changes: 0 additions & 55 deletions api/v1alpha1/zz_generated.deepcopy.go

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

4 changes: 3 additions & 1 deletion charts/platform/crds/frisbee.dev_calls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.9.2
creationTimestamp: null
name: calls.frisbee.dev
spec:
group: frisbee.dev
Expand Down Expand Up @@ -177,6 +178,7 @@ spec:
type: integer
type: object
required:
- callable
- services
type: object
status:
Expand Down
3 changes: 2 additions & 1 deletion charts/platform/crds/frisbee.dev_cascades.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.9.2
creationTimestamp: null
name: cascades.frisbee.dev
spec:
group: frisbee.dev
Expand Down
3 changes: 2 additions & 1 deletion charts/platform/crds/frisbee.dev_chaos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.9.2
creationTimestamp: null
name: chaos.frisbee.dev
spec:
group: frisbee.dev
Expand Down
3 changes: 2 additions & 1 deletion charts/platform/crds/frisbee.dev_clusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.9.2
creationTimestamp: null
name: clusters.frisbee.dev
spec:
group: frisbee.dev
Expand Down
4 changes: 3 additions & 1 deletion charts/platform/crds/frisbee.dev_scenarios.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.9.2
creationTimestamp: null
name: scenarios.frisbee.dev
spec:
group: frisbee.dev
Expand Down Expand Up @@ -226,6 +227,7 @@ spec:
type: integer
type: object
required:
- callable
- services
type: object
cascade:
Expand Down
3 changes: 2 additions & 1 deletion charts/platform/crds/frisbee.dev_services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.9.2
creationTimestamp: null
name: services.frisbee.dev
spec:
group: frisbee.dev
Expand Down
3 changes: 2 additions & 1 deletion charts/platform/crds/frisbee.dev_templates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.9.2
creationTimestamp: null
name: templates.frisbee.dev
spec:
group: frisbee.dev
Expand Down
3 changes: 2 additions & 1 deletion charts/platform/crds/frisbee.dev_virtualobjects.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.9.2
creationTimestamp: null
name: virtualobjects.frisbee.dev
spec:
group: frisbee.dev
Expand Down
1 change: 1 addition & 0 deletions charts/platform/templates/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: frisbee
rules:
- apiGroups:
Expand Down
Loading

0 comments on commit 9bc87ba

Please sign in to comment.