Skip to content
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
2 changes: 1 addition & 1 deletion api/v2beta1/atom_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ type AtomStatus struct {
}

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:skipversion
// versionName=v2beta1

// Atom is the Schema for the atoms API.
Expand Down
7 changes: 0 additions & 7 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,8 @@ import (
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
"sigs.k8s.io/controller-runtime/pkg/webhook"

pdoknlv2beta1 "github.com/pdok/atom-operator/api/v2beta1"
pdoknlv3 "github.com/pdok/atom-operator/api/v3"
"github.com/pdok/atom-operator/internal/controller"
webhookpdoknlv2beta1 "github.com/pdok/atom-operator/internal/webhook/v2beta1"
webhookpdoknlv3 "github.com/pdok/atom-operator/internal/webhook/v3"
// +kubebuilder:scaffold:imports
)
Expand All @@ -65,7 +63,6 @@ func init() {
utilruntime.Must(clientgoscheme.AddToScheme(scheme))

utilruntime.Must(pdoknlv3.AddToScheme(scheme))
utilruntime.Must(pdoknlv2beta1.AddToScheme(scheme))
utilruntime.Must(traefikiov1alpha1.AddToScheme(scheme))
utilruntime.Must(smoothoperatorv1.AddToScheme(scheme))

Expand Down Expand Up @@ -198,10 +195,6 @@ func main() {
}

if os.Getenv("ENABLE_WEBHOOKS") != "false" {
if err = webhookpdoknlv2beta1.SetupAtomWebhookWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create webhook", "webhook", "Atom")
os.Exit(1)
}

if err = webhookpdoknlv3.SetupAtomWebhookWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create webhook", "webhook", "Atom")
Expand Down
307 changes: 0 additions & 307 deletions config/crd/bases/pdok.nl_atoms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,313 +16,6 @@ spec:
singular: atom
scope: Namespaced
versions:
- name: v2beta1
schema:
openAPIV3Schema:
description: Atom is the Schema for the atoms API.
properties:
apiVersion:
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
description: AtomSpec defines the desired state of Atom.
properties:
general:
description: General is the struct with all generic fields for the
crds
properties:
dataVersion:
type: string
dataset:
type: string
datasetOwner:
type: string
serviceVersion:
type: string
theme:
type: string
required:
- dataset
- datasetOwner
type: object
kubernetes:
description: Kubernetes is the struct with all fields that can be
defined in kubernetes fields in the crds
properties:
autoscaling:
description: Autoscaling is the struct with all fields to configure
autoscalers for the crs
properties:
averageCpuUtilization:
type: integer
maxReplicas:
type: integer
minReplicas:
type: integer
type: object
healthCheck:
description: HealthCheck is the struct with all fields to configure
healthchecks for the crs
properties:
boundingbox:
type: string
mimetype:
type: string
querystring:
type: string
type: object
lifecycle:
description: Lifecycle is the struct with the fields to configure
lifecycle settings for the resources
properties:
ttlInDays:
type: integer
type: object
resources:
description: ResourceRequirements describes the compute resource
requirements.
properties:
claims:
description: |-
Claims lists the names of resources, defined in spec.resourceClaims,
that are used by this container.

This is an alpha field and requires enabling the
DynamicResourceAllocation feature gate.

This field is immutable. It can only be set for containers.
items:
description: ResourceClaim references one entry in PodSpec.ResourceClaims.
properties:
name:
description: |-
Name must match the name of one entry in pod.spec.resourceClaims of
the Pod where this field is used. It makes that resource available
inside a container.
type: string
request:
description: |-
Request is the name chosen for a request in the referenced claim.
If empty, everything from the claim is made available, otherwise
only the result of this request.
type: string
required:
- name
type: object
type: array
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
limits:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: |-
Limits describes the maximum amount of compute resources allowed.
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
type: object
requests:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: |-
Requests describes the minimum amount of compute resources required.
If Requests is omitted for a container, it defaults to Limits if that is explicitly specified,
otherwise to an implementation-defined value. Requests cannot exceed Limits.
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
type: object
type: object
type: object
service:
description: AtomService is the struct for all service level fields
properties:
author:
description: Author is the struct with the input for the author
field of an atom
properties:
email:
type: string
name:
type: string
required:
- email
- name
type: object
datasets:
items:
description: Dataset is the struct for all dataset level fields
properties:
bbox:
description: Bbox is the struct for the bounding box extent
of an atom
properties:
maxx:
type: number
maxy:
type: number
minx:
type: number
miny:
type: number
required:
- maxx
- maxy
- minx
- miny
type: object
downloads:
items:
description: Download is the struct for the download level
fields
properties:
content:
type: string
links:
items:
description: Link represents a link in a download
entry
properties:
bbox:
description: Bbox is the struct for the bounding
box extent of an atom
properties:
maxx:
type: number
maxy:
type: number
minx:
type: number
miny:
type: number
required:
- maxx
- maxy
- minx
- miny
type: object
blobKey:
type: string
rel:
type: string
updated:
type: string
version:
type: string
required:
- blobKey
type: object
type: array
name:
type: string
srs:
description: Srs is the struct with the information
for the srs field of an atom
properties:
code:
type: string
uri:
type: string
required:
- code
- uri
type: object
title:
type: string
updated:
type: string
required:
- name
- srs
type: object
type: array
links:
items:
description: OtherLink represents any type of link that
is not a download link related to the data (see Link)
properties:
contentType:
type: string
language:
type: string
type:
type: string
uri:
type: string
required:
- type
- uri
type: object
type: array
metadataIdentifier:
type: string
name:
type: string
sourceIdentifier:
type: string
subtitle:
type: string
title:
type: string
required:
- bbox
- downloads
- metadataIdentifier
- name
- sourceIdentifier
- subtitle
- title
type: object
type: array
metadataIdentifier:
type: string
rights:
type: string
subtitle:
type: string
title:
type: string
updated:
type: string
required:
- author
- datasets
- metadataIdentifier
- rights
- subtitle
- title
type: object
required:
- general
- service
type: object
status:
description: AtomStatus defines the observed state of Atom.
type: object
type: object
served: true
storage: false
subresources:
status: {}
- name: v3
schema:
openAPIV3Schema:
Expand Down
4 changes: 2 additions & 2 deletions config/crd/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ configMapGenerator:
files:
- CSP=content-security-policy.txt

patches:
# patches:
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix.
# patches here are for enabling the conversion webhook for each CRD
- path: patches/webhook_in_atoms.yaml
# - path: patches/webhook_in_atoms.yaml
# +kubebuilder:scaffold:crdkustomizewebhookpatch

# [WEBHOOK] To enable webhook, uncomment the following section
Expand Down
Loading
Loading