Skip to content

Instantly share code, notes, and snippets.

@cari-lynn
Last active August 22, 2021 06:38
Show Gist options
  • Save cari-lynn/0521ed8461358ce64537e68ff2f5b6e7 to your computer and use it in GitHub Desktop.
Save cari-lynn/0521ed8461358ce64537e68ff2f5b6e7 to your computer and use it in GitHub Desktop.
OpenAPI Document inserted into Package Definition WITH NAMESPACING (ytt -f package.yml --data-value-file openapi=openapi.yml)
openapi: 3.0.0 # Version of the openapi spec
info:
version: 1.0.0 # Version of this document
title: Openapi schema generated from ytt schema
components:
schemas:
type: object
properties:
namespace:
type: string
default: fluent-bit
#@ load("@ytt:data", "data")
#@ load("@ytt:yaml", "yaml")
---
apiVersion: data.packaging.carvel.dev/v1alpha1
kind: Package
metadata:
name: fluent-bit.carvel.dev.1.5.3
namespace: my-ns
spec:
refName: fluent-bit.carvel.dev
version: 1.5.3
releaseNotes: "Fixed some bugs"
capacityRequirementsDescription: "RAM: 10GB"
licenses:
- "Apache 2.0"
- "MIT"
releasedAt: 2021-05-05T18:57:06Z
valuesSchema:
openAPIv3: #@ yaml.decode(data.values.openapi)["components"]["schemas"]
template:
spec:
fetch:
- imgpkgBundle:
image: registry.tkg.vmware.run/tkg-fluent-bit@sha256:...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment