Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup the api surface #1

Merged
merged 4 commits into from
Feb 1, 2023
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ bin
vendor/
bin/
dist/
cover.out

# apiserver certificates
config/certificates
3 changes: 1 addition & 2 deletions cmd/apiserver/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ func main() {
err := builder.APIServer.
// +kubebuilder:scaffold:resource-register
WithResource(&corev1beta1.Package{}).
WithResource(&corev1beta1.Package{}).
WithResource(&corev1beta1.CatalogCache{}).
WithResource(&corev1beta1.BundleMetadata{}).
WithResource(&corev1beta1.CatalogSource{}).
Execute()
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions config/controller-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ spec:
imagePullPolicy: IfNotPresent
command:
- "./manager"
args:
args: []
resources:
requests:
cpu: 100m
cpu: 1000m
memory: 200Mi
limits:
cpu: 100m
cpu: 1000m
memory: 300Mi
volumes:
- name: apiserver-certs
Expand Down
90 changes: 90 additions & 0 deletions config/crd/bases/core.rukpak.io_bundlemetadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.0
creationTimestamp: null
name: bundlemetadata.core.rukpak.io
spec:
group: core.rukpak.io
names:
kind: BundleMetadata
listKind: BundleMetadataList
plural: bundlemetadata
singular: bundlemetadata
scope: Cluster
versions:
- name: v1beta1
schema:
openAPIV3Schema:
description: BundleMetadata
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: BundleMetadataSpec defines the desired state of BundleMetadata
properties:
catalogSource:
description: CatalogSource is the name of the CatalogSource that provides
this bundle
type: string
image:
description: Image is a reference to the image that provides the bundle
contents
type: string
package:
description: Package is the name of the package that provides this
bundle
type: string
properties:
description: Properties is a string of references to property objects
that are part of the bundle
items:
properties:
type:
type: string
value:
format: byte
type: string
required:
- type
- value
type: object
type: array
relatedImages:
description: RelatedImages are the RelatedImages in the bundle
items:
properties:
image:
type: string
name:
type: string
required:
- image
- name
type: object
type: array
required:
- catalogSource
- image
- package
- properties
- relatedImages
type: object
status:
description: BundleMetadataStatus defines the observed state of BundleMetadata
type: object
type: object
served: true
storage: true
165 changes: 0 additions & 165 deletions config/crd/bases/core.rukpak.io_catalogcaches.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion config/crd/bases/core.rukpak.io_catalogsources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
listKind: CatalogSourceList
plural: catalogsources
singular: catalogsource
scope: Namespaced
scope: Cluster
versions:
- name: v1beta1
schema:
Expand Down
46 changes: 24 additions & 22 deletions config/crd/bases/core.rukpak.io_packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
listKind: PackageList
plural: packages
singular: package
scope: Namespaced
scope: Cluster
versions:
- name: v1beta1
schema:
Expand Down Expand Up @@ -41,10 +41,6 @@ spec:
type: string
catalogSourceDisplayName:
type: string
catalogSourceNamespace:
description: CatalogSourceNamespace is the namespace of the owning
CatalogSource
type: string
catalogSourcePublisher:
type: string
channels:
Expand All @@ -54,15 +50,30 @@ spec:
description: PackageChannel defines a single channel under a package,
pointing to a version of that package.
properties:
head:
description: Head is the head bundle in the channel.
type: string
entries:
description: Entries is all the channel entries within a channel
items:
properties:
name:
type: string
replaces:
type: string
skipRange:
type: string
skips:
items:
type: string
type: array
required:
- name
type: object
type: array
name:
description: Name is the name of the channel, e.g. `alpha` or
`stable`
type: string
required:
- head
- entries
- name
type: object
type: array
Expand All @@ -72,6 +83,9 @@ spec:
no other channel is explicitly given. If the package has a single
channel, then that channel is implicitly the default.
type: string
description:
description: Description is the description of the package
type: string
icon:
description: Icon is the Base64data image of the package for console
display
Expand All @@ -81,23 +95,11 @@ spec:
mediatype:
type: string
type: object
packageName:
description: PackageName is the name of the overall package, ala `etcd`.
type: string
provider:
description: Provider is the provider of the Package
properties:
name:
type: string
url:
type: string
type: object
required:
- catalogSource
- catalogSourceNamespace
- channels
- defaultChannel
- packageName
- description
type: object
status:
description: PackageStatus defines the observed state of Package
Expand Down
Loading