Skip to content

Commit

Permalink
Remove kubernetes io reference
Browse files Browse the repository at this point in the history
Signed-off-by: Jackline Mutua <[email protected]>
  • Loading branch information
katmutua committed Apr 13, 2022
1 parent 58d1dbb commit fefe229
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 18 deletions.
79 changes: 63 additions & 16 deletions api/openapi-spec/conventions-server..yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@ paths:
"application/json":
schema:
$ref: '#/components/schemas/PodConventionContext'
exmaples:
conventions:
summary: ""

400:
description: Error decoding PodConventionContext from request body or request body is nil
description: Error decoding PodConventionContext from the request body or request body is nil
500:
description: Internal server error
content:
Expand All @@ -31,33 +35,57 @@ components:
PodConventionContext:
type: object
properties:
apiVersions:
type: string
kind:
type: string
metadata:
type: array
items:
type: string
spec:
$ref: "#/components/schemas/PodConventionContextSpec"
status:
$ref: "#/components/schemas/PodConventionContextStatus"
PodConventionContextSpec:
type: object
properties:
Template:
template:
$ref: "#/components/schemas/PodTemplateSpec"
ImageConfig:
$ref: "#/components/schemas/ImageConfig"
PodConventionContextStatus:
imageConfig:
type: array
description: an array of imageConfig objects
items:
$ref: "#/components/schemas/ImageConfig"
PodTemplateSpec:
type: object
properties:
Template:
$ref: "#/components/schemas/PodTemplateSpec"
appliedConventions:
description: a string array of conventions to be applied
type: object
spec:
type: object
description: specification of the desired behavior of a pod
metadata:
type: object
properties:
annotations:
type: object
additionalProperties:
type: string
labels:
type: object
additionalProperties:
type: string
ImageConfig:
type: object
properties:
image:
type: string
description: a string reference to the image name and tag or associated digest
boms:
$ref: "#/components/schemas/BOM"
example: "example.com/repository/nginx:alpine"
BOMs:
type: array
description: "an array of bill of matearials (BOMs)"
items:
$ref: "#/components/schemas/BOM"
config:
type: object
description: "a ggcrv1 config file object"
Expand All @@ -71,12 +99,31 @@ components:
type: array
items:
type: object
PodTemplateSpec:
PodConventionContextStatus:
type: object
properties:
template:
$ref: "#/components/schemas/PodTemplateSpec"
appliedConventions:
description: a string array of conventions to be applied
type: array
items:
type: string
Convention:
type: object
properties:
spec:
$ref: "kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#pod-v1-core"
description: specification of the desired behavior of a pod
name:
type: string
selectors:
type: object
priority:
$ref: "#/components/schemas/PriorityLevel"
clientConfig:
$ref: "#/components/schemas/WebhookClientConfig"
WebhookClientConfig:
type: object
PriorityLevel:
type: string
ErrorResponse:
type: object
properties:
Expand Down
4 changes: 2 additions & 2 deletions docs/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
- [PodIntent (conventions.carto.run/v1alpha1)](#podintent-conventionscartorunv1alpha1)
- [ClusterPodConvention (conventions.carto.run/v1alpha1)](#clusterpodconvention-conventionscartorunv1alpha1)
- [PodConventionContext (webhooks.conventions.carto.run/v1alpha1)](#podconventioncontext-webhooksconventionscartorunv1alpha1)
- [Webhook contract](#webhook-contract)
- [Webhook Helper Library](#webhook-helper-library)
- [Lifecycle](#lifecycle)
- [Security](#security)
- [Supportability](#supportability)
Expand Down Expand Up @@ -238,7 +238,7 @@ status: # the response

In the future other mechanisms may be defined to provide conventions other than webhooks. In particular, mechanisms that are safe to execute within the controller process like a YTT overlay or WebAssembly. Each mechanism will define the specifics of its own contract similar in scope to the `PodConventionContext`.

#### Webhook Contract
#### Webhook Helper Library

In order for the conventions controller to apply a set of conventions, it requires these conventions to be authored in the form of a webhook.

Expand Down

0 comments on commit fefe229

Please sign in to comment.