Compare commits
4 Commits
main
...
1.15.0-del
Author | SHA1 | Date |
---|---|---|
|
ee19313ea9 | |
|
58cf299286 | |
|
f25bf16b83 | |
|
22907e78a0 |
|
@ -1,68 +0,0 @@
|
||||||
name: Release a new version of a provider model
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
releaseversion:
|
|
||||||
type: string
|
|
||||||
description: 'Version to release'
|
|
||||||
required: true
|
|
||||||
provider:
|
|
||||||
type: choice
|
|
||||||
description: 'Provider to release'
|
|
||||||
required: true
|
|
||||||
options:
|
|
||||||
- provider-upjet-azure
|
|
||||||
- provider-upjet-azuread
|
|
||||||
- provider-upjet-aws
|
|
||||||
- provider-upjet-gcp
|
|
||||||
- provider-upjet-github
|
|
||||||
- provider-terraform
|
|
||||||
- provider-kubernetes
|
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Set up JDK 17
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
java-version: '17'
|
|
||||||
distribution: 'oracle'
|
|
||||||
cache: maven
|
|
||||||
server-id: central
|
|
||||||
server-username: MAVEN_CENTRAL_USERNAME # env variable for username in deploy
|
|
||||||
server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy
|
|
||||||
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
|
|
||||||
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
|
|
||||||
- name: Fetch crds
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
working-directory: "./provider-models/crossplane-${{ github.event.inputs.provider }}/src/main/resources/kubernetes"
|
|
||||||
run : ./fetch.sh "${{ github.event.inputs.releaseversion }}"
|
|
||||||
- name: List crds
|
|
||||||
working-directory: "./provider-models/crossplane-${{ github.event.inputs.provider }}/src/main/resources/kubernetes"
|
|
||||||
run : ls
|
|
||||||
- name: Set the revision property
|
|
||||||
working-directory: "./provider-models/crossplane-${{ github.event.inputs.provider }}"
|
|
||||||
run: mvn versions:set-property -Dproperty=modelrevision "-DnewVersion=${{ github.event.inputs.releaseversion }}" -DgenerateBackupPoms=false
|
|
||||||
- name: Build with Maven
|
|
||||||
working-directory: "./provider-models/crossplane-${{ github.event.inputs.provider }}"
|
|
||||||
run: mvn -B deploy --file pom.xml -Pdeploy
|
|
||||||
env:
|
|
||||||
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
|
|
||||||
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
|
|
||||||
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
|
|
||||||
MAVEN_OPTS: "-Xmx2048m"
|
|
||||||
- name: Create release
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
tag: "${{ github.event.inputs.releaseversion }}"
|
|
||||||
provider: "${{ github.event.inputs.provider }}"
|
|
||||||
run: |
|
|
||||||
gh release create "$provider-$tag" \
|
|
||||||
--repo="$GITHUB_REPOSITORY" \
|
|
||||||
--title="$provider-v${tag#v}" \
|
|
||||||
--target "$GITHUB_SHA"
|
|
|
@ -5,7 +5,7 @@ on:
|
||||||
inputs:
|
inputs:
|
||||||
releaseversion:
|
releaseversion:
|
||||||
type: string
|
type: string
|
||||||
description: 'Version to release'
|
description: 'Version to reelase'
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -28,5 +28,3 @@ replay_pid*
|
||||||
.idea/
|
.idea/
|
||||||
target/
|
target/
|
||||||
generated/
|
generated/
|
||||||
|
|
||||||
provider-models/**/src/main/resources/kubernetes/*.yaml
|
|
|
@ -1,9 +1,8 @@
|
||||||
---
|
|
||||||
apiVersion: apiextensions.k8s.io/v1
|
apiVersion: apiextensions.k8s.io/v1
|
||||||
kind: CustomResourceDefinition
|
kind: CustomResourceDefinition
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
annotations:
|
||||||
controller-gen.kubebuilder.io/version: v0.16.5
|
controller-gen.kubebuilder.io/version: v0.14.0
|
||||||
name: compositeresourcedefinitions.apiextensions.crossplane.io
|
name: compositeresourcedefinitions.apiextensions.crossplane.io
|
||||||
spec:
|
spec:
|
||||||
group: apiextensions.crossplane.io
|
group: apiextensions.crossplane.io
|
||||||
|
@ -33,11 +32,9 @@ spec:
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
description: |-
|
description: |-
|
||||||
A CompositeResourceDefinition defines the schema for a new custom Kubernetes
|
A CompositeResourceDefinition defines a new kind of composite infrastructure
|
||||||
API.
|
resource. The new resource is composed of other composite or managed
|
||||||
|
infrastructure resources.
|
||||||
Read the Crossplane documentation for
|
|
||||||
[more information about CustomResourceDefinitions](https://docs.crossplane.io/latest/concepts/composite-resource-definitions).
|
|
||||||
properties:
|
properties:
|
||||||
apiVersion:
|
apiVersion:
|
||||||
description: |-
|
description: |-
|
||||||
|
@ -79,7 +76,6 @@ spec:
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
type: array
|
type: array
|
||||||
x-kubernetes-list-type: atomic
|
|
||||||
kind:
|
kind:
|
||||||
description: |-
|
description: |-
|
||||||
kind is the serialized kind of the resource. It is normally CamelCase and singular.
|
kind is the serialized kind of the resource. It is normally CamelCase and singular.
|
||||||
|
@ -104,7 +100,6 @@ spec:
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
type: array
|
type: array
|
||||||
x-kubernetes-list-type: atomic
|
|
||||||
singular:
|
singular:
|
||||||
description: singular is the singular name of the resource. It
|
description: singular is the singular name of the resource. It
|
||||||
must be all lowercase. Defaults to lowercased `kind`.
|
must be all lowercase. Defaults to lowercased `kind`.
|
||||||
|
@ -113,9 +108,6 @@ spec:
|
||||||
- kind
|
- kind
|
||||||
- plural
|
- plural
|
||||||
type: object
|
type: object
|
||||||
x-kubernetes-validations:
|
|
||||||
- message: Value is immutable
|
|
||||||
rule: self == oldSelf
|
|
||||||
connectionSecretKeys:
|
connectionSecretKeys:
|
||||||
description: |-
|
description: |-
|
||||||
ConnectionSecretKeys is the list of keys that will be exposed to the end
|
ConnectionSecretKeys is the list of keys that will be exposed to the end
|
||||||
|
@ -154,6 +146,7 @@ spec:
|
||||||
service is a reference to the service for this webhook. Either
|
service is a reference to the service for this webhook. Either
|
||||||
service or url must be specified.
|
service or url must be specified.
|
||||||
|
|
||||||
|
|
||||||
If the webhook is running within the cluster, then you should use `service`.
|
If the webhook is running within the cluster, then you should use `service`.
|
||||||
properties:
|
properties:
|
||||||
name:
|
name:
|
||||||
|
@ -187,24 +180,29 @@ spec:
|
||||||
(`scheme://host:port/path`). Exactly one of `url` or `service`
|
(`scheme://host:port/path`). Exactly one of `url` or `service`
|
||||||
must be specified.
|
must be specified.
|
||||||
|
|
||||||
|
|
||||||
The `host` should not refer to a service running in the cluster; use
|
The `host` should not refer to a service running in the cluster; use
|
||||||
the `service` field instead. The host might be resolved via external
|
the `service` field instead. The host might be resolved via external
|
||||||
DNS in some apiservers (e.g., `kube-apiserver` cannot resolve
|
DNS in some apiservers (e.g., `kube-apiserver` cannot resolve
|
||||||
in-cluster DNS as that would be a layering violation). `host` may
|
in-cluster DNS as that would be a layering violation). `host` may
|
||||||
also be an IP address.
|
also be an IP address.
|
||||||
|
|
||||||
|
|
||||||
Please note that using `localhost` or `127.0.0.1` as a `host` is
|
Please note that using `localhost` or `127.0.0.1` as a `host` is
|
||||||
risky unless you take great care to run this webhook on all hosts
|
risky unless you take great care to run this webhook on all hosts
|
||||||
which run an apiserver which might need to make calls to this
|
which run an apiserver which might need to make calls to this
|
||||||
webhook. Such installs are likely to be non-portable, i.e., not easy
|
webhook. Such installs are likely to be non-portable, i.e., not easy
|
||||||
to turn up in a new cluster.
|
to turn up in a new cluster.
|
||||||
|
|
||||||
|
|
||||||
The scheme must be "https"; the URL must begin with "https://".
|
The scheme must be "https"; the URL must begin with "https://".
|
||||||
|
|
||||||
|
|
||||||
A path is optional, and if present may be any string permissible in
|
A path is optional, and if present may be any string permissible in
|
||||||
a URL. You may use the path to pass an arbitrary string to the
|
a URL. You may use the path to pass an arbitrary string to the
|
||||||
webhook, for example, a cluster identifier.
|
webhook, for example, a cluster identifier.
|
||||||
|
|
||||||
|
|
||||||
Attempting to use a user or basic auth e.g. "user:password@" is not
|
Attempting to use a user or basic auth e.g. "user:password@" is not
|
||||||
allowed. Fragments ("#...") and query parameters ("?...") are not
|
allowed. Fragments ("#...") and query parameters ("?...") are not
|
||||||
allowed, either.
|
allowed, either.
|
||||||
|
@ -221,7 +219,6 @@ spec:
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
type: array
|
type: array
|
||||||
x-kubernetes-list-type: atomic
|
|
||||||
required:
|
required:
|
||||||
- conversionReviewVersions
|
- conversionReviewVersions
|
||||||
type: object
|
type: object
|
||||||
|
@ -268,18 +265,12 @@ spec:
|
||||||
required:
|
required:
|
||||||
- name
|
- name
|
||||||
type: object
|
type: object
|
||||||
x-kubernetes-validations:
|
|
||||||
- message: Value is immutable
|
|
||||||
rule: self == oldSelf
|
|
||||||
group:
|
group:
|
||||||
description: |-
|
description: |-
|
||||||
Group specifies the API group of the defined composite resource.
|
Group specifies the API group of the defined composite resource.
|
||||||
Composite resources are served under `/apis/<group>/...`. Must match the
|
Composite resources are served under `/apis/<group>/...`. Must match the
|
||||||
name of the XRD (in the form `<names.plural>.<group>`).
|
name of the XRD (in the form `<names.plural>.<group>`).
|
||||||
type: string
|
type: string
|
||||||
x-kubernetes-validations:
|
|
||||||
- message: Value is immutable
|
|
||||||
rule: self == oldSelf
|
|
||||||
metadata:
|
metadata:
|
||||||
description: Metadata specifies the desired metadata for the defined
|
description: Metadata specifies the desired metadata for the defined
|
||||||
composite resource and claim CRD's.
|
composite resource and claim CRD's.
|
||||||
|
@ -318,7 +309,6 @@ spec:
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
type: array
|
type: array
|
||||||
x-kubernetes-list-type: atomic
|
|
||||||
kind:
|
kind:
|
||||||
description: |-
|
description: |-
|
||||||
kind is the serialized kind of the resource. It is normally CamelCase and singular.
|
kind is the serialized kind of the resource. It is normally CamelCase and singular.
|
||||||
|
@ -343,7 +333,6 @@ spec:
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
type: array
|
type: array
|
||||||
x-kubernetes-list-type: atomic
|
|
||||||
singular:
|
singular:
|
||||||
description: singular is the singular name of the resource. It
|
description: singular is the singular name of the resource. It
|
||||||
must be all lowercase. Defaults to lowercased `kind`.
|
must be all lowercase. Defaults to lowercased `kind`.
|
||||||
|
@ -352,9 +341,6 @@ spec:
|
||||||
- kind
|
- kind
|
||||||
- plural
|
- plural
|
||||||
type: object
|
type: object
|
||||||
x-kubernetes-validations:
|
|
||||||
- message: Value is immutable
|
|
||||||
rule: self == oldSelf
|
|
||||||
versions:
|
versions:
|
||||||
description: |-
|
description: |-
|
||||||
Versions is the list of all API versions of the defined composite
|
Versions is the list of all API versions of the defined composite
|
||||||
|
@ -494,13 +480,6 @@ spec:
|
||||||
A Message containing details about this condition's last transition from
|
A Message containing details about this condition's last transition from
|
||||||
one status to another, if any.
|
one status to another, if any.
|
||||||
type: string
|
type: string
|
||||||
observedGeneration:
|
|
||||||
description: |-
|
|
||||||
ObservedGeneration represents the .metadata.generation that the condition was set based upon.
|
|
||||||
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
|
|
||||||
with respect to the current state of the instance.
|
|
||||||
format: int64
|
|
||||||
type: integer
|
|
||||||
reason:
|
reason:
|
||||||
description: A Reason for this condition's last transition from
|
description: A Reason for this condition's last transition from
|
||||||
one status to another.
|
one status to another.
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,9 +1,8 @@
|
||||||
---
|
|
||||||
apiVersion: apiextensions.k8s.io/v1
|
apiVersion: apiextensions.k8s.io/v1
|
||||||
kind: CustomResourceDefinition
|
kind: CustomResourceDefinition
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
annotations:
|
||||||
controller-gen.kubebuilder.io/version: v0.16.5
|
controller-gen.kubebuilder.io/version: v0.14.0
|
||||||
name: compositions.apiextensions.crossplane.io
|
name: compositions.apiextensions.crossplane.io
|
||||||
spec:
|
spec:
|
||||||
group: apiextensions.crossplane.io
|
group: apiextensions.crossplane.io
|
||||||
|
@ -31,12 +30,7 @@ spec:
|
||||||
name: v1
|
name: v1
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
description: |-
|
description: A Composition specifies how a composite resource should be composed.
|
||||||
A Composition defines a collection of managed resources or functions that
|
|
||||||
Crossplane uses to create and manage new composite resources.
|
|
||||||
|
|
||||||
Read the Crossplane documentation for
|
|
||||||
[more information about Compositions](https://docs.crossplane.io/latest/concepts/compositions).
|
|
||||||
properties:
|
properties:
|
||||||
apiVersion:
|
apiVersion:
|
||||||
description: |-
|
description: |-
|
||||||
|
@ -73,26 +67,523 @@ spec:
|
||||||
- apiVersion
|
- apiVersion
|
||||||
- kind
|
- kind
|
||||||
type: object
|
type: object
|
||||||
x-kubernetes-validations:
|
environment:
|
||||||
- message: Value is immutable
|
description: |-
|
||||||
rule: self == oldSelf
|
Environment configures the environment in which resources are rendered.
|
||||||
|
|
||||||
|
|
||||||
|
THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored
|
||||||
|
unless the relevant Crossplane feature flag is enabled, and may be
|
||||||
|
changed or removed without notice.
|
||||||
|
properties:
|
||||||
|
defaultData:
|
||||||
|
additionalProperties:
|
||||||
|
x-kubernetes-preserve-unknown-fields: true
|
||||||
|
description: |-
|
||||||
|
DefaultData statically defines the initial state of the environment.
|
||||||
|
It has the same schema-less structure as the data field in
|
||||||
|
environment configs.
|
||||||
|
It is overwritten by the selected environment configs.
|
||||||
|
type: object
|
||||||
|
environmentConfigs:
|
||||||
|
description: |-
|
||||||
|
EnvironmentConfigs selects a list of `EnvironmentConfig`s. The resolved
|
||||||
|
resources are stored in the composite resource at
|
||||||
|
`spec.environmentConfigRefs` and is only updated if it is null.
|
||||||
|
|
||||||
|
|
||||||
|
The list of references is used to compute an in-memory environment at
|
||||||
|
compose time. The data of all object is merged in the order they are
|
||||||
|
listed, meaning the values of EnvironmentConfigs with a larger index take
|
||||||
|
priority over ones with smaller indices.
|
||||||
|
|
||||||
|
|
||||||
|
The computed environment can be accessed in a composition using
|
||||||
|
`FromEnvironmentFieldPath` and `CombineFromEnvironment` patches.
|
||||||
|
items:
|
||||||
|
description: EnvironmentSource selects a EnvironmentConfig resource.
|
||||||
|
properties:
|
||||||
|
ref:
|
||||||
|
description: |-
|
||||||
|
Ref is a named reference to a single EnvironmentConfig.
|
||||||
|
Either Ref or Selector is required.
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
description: The name of the object.
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- name
|
||||||
|
type: object
|
||||||
|
selector:
|
||||||
|
description: Selector selects EnvironmentConfig(s) via labels.
|
||||||
|
properties:
|
||||||
|
matchLabels:
|
||||||
|
description: MatchLabels ensures an object with matching
|
||||||
|
labels is selected.
|
||||||
|
items:
|
||||||
|
description: |-
|
||||||
|
An EnvironmentSourceSelectorLabelMatcher acts like a k8s label selector but
|
||||||
|
can draw the label value from a different path.
|
||||||
|
properties:
|
||||||
|
fromFieldPathPolicy:
|
||||||
|
default: Required
|
||||||
|
description: |-
|
||||||
|
FromFieldPathPolicy specifies the policy for the valueFromFieldPath.
|
||||||
|
The default is Required, meaning that an error will be returned if the
|
||||||
|
field is not found in the composite resource.
|
||||||
|
Optional means that if the field is not found in the composite resource,
|
||||||
|
that label pair will just be skipped. N.B. other specified label
|
||||||
|
matchers will still be used to retrieve the desired
|
||||||
|
environment config, if any.
|
||||||
|
enum:
|
||||||
|
- Optional
|
||||||
|
- Required
|
||||||
|
type: string
|
||||||
|
key:
|
||||||
|
description: Key of the label to match.
|
||||||
|
type: string
|
||||||
|
type:
|
||||||
|
default: FromCompositeFieldPath
|
||||||
|
description: Type specifies where the value for
|
||||||
|
a label comes from.
|
||||||
|
enum:
|
||||||
|
- FromCompositeFieldPath
|
||||||
|
- Value
|
||||||
|
type: string
|
||||||
|
value:
|
||||||
|
description: Value specifies a literal label value.
|
||||||
|
type: string
|
||||||
|
valueFromFieldPath:
|
||||||
|
description: ValueFromFieldPath specifies the
|
||||||
|
field path to look for the label value.
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- key
|
||||||
|
type: object
|
||||||
|
type: array
|
||||||
|
maxMatch:
|
||||||
|
description: MaxMatch specifies the number of extracted
|
||||||
|
EnvironmentConfigs in Multiple mode, extracts all
|
||||||
|
if nil.
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
minMatch:
|
||||||
|
description: MinMatch specifies the required minimum
|
||||||
|
of extracted EnvironmentConfigs in Multiple mode.
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
mode:
|
||||||
|
default: Single
|
||||||
|
description: 'Mode specifies retrieval strategy: "Single"
|
||||||
|
or "Multiple".'
|
||||||
|
enum:
|
||||||
|
- Single
|
||||||
|
- Multiple
|
||||||
|
type: string
|
||||||
|
sortByFieldPath:
|
||||||
|
default: metadata.name
|
||||||
|
description: SortByFieldPath is the path to the field
|
||||||
|
based on which list of EnvironmentConfigs is alphabetically
|
||||||
|
sorted.
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
type:
|
||||||
|
default: Reference
|
||||||
|
description: |-
|
||||||
|
Type specifies the way the EnvironmentConfig is selected.
|
||||||
|
Default is `Reference`
|
||||||
|
enum:
|
||||||
|
- Reference
|
||||||
|
- Selector
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
type: array
|
||||||
|
patches:
|
||||||
|
description: |-
|
||||||
|
Patches is a list of environment patches that are executed before a
|
||||||
|
composition's resources are composed.
|
||||||
|
items:
|
||||||
|
description: EnvironmentPatch is a patch for a Composition environment.
|
||||||
|
properties:
|
||||||
|
combine:
|
||||||
|
description: |-
|
||||||
|
Combine is the patch configuration for a CombineFromComposite or
|
||||||
|
CombineToComposite patch.
|
||||||
|
properties:
|
||||||
|
strategy:
|
||||||
|
description: |-
|
||||||
|
Strategy defines the strategy to use to combine the input variable values.
|
||||||
|
Currently only string is supported.
|
||||||
|
enum:
|
||||||
|
- string
|
||||||
|
type: string
|
||||||
|
string:
|
||||||
|
description: |-
|
||||||
|
String declares that input variables should be combined into a single
|
||||||
|
string, using the relevant settings for formatting purposes.
|
||||||
|
properties:
|
||||||
|
fmt:
|
||||||
|
description: |-
|
||||||
|
Format the input using a Go format string. See
|
||||||
|
https://golang.org/pkg/fmt/ for details.
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- fmt
|
||||||
|
type: object
|
||||||
|
variables:
|
||||||
|
description: |-
|
||||||
|
Variables are the list of variables whose values will be retrieved and
|
||||||
|
combined.
|
||||||
|
items:
|
||||||
|
description: |-
|
||||||
|
A CombineVariable defines the source of a value that is combined with
|
||||||
|
others to form and patch an output value. Currently, this only supports
|
||||||
|
retrieving values from a field path.
|
||||||
|
properties:
|
||||||
|
fromFieldPath:
|
||||||
|
description: |-
|
||||||
|
FromFieldPath is the path of the field on the source whose value is
|
||||||
|
to be used as input.
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- fromFieldPath
|
||||||
|
type: object
|
||||||
|
minItems: 1
|
||||||
|
type: array
|
||||||
|
required:
|
||||||
|
- strategy
|
||||||
|
- variables
|
||||||
|
type: object
|
||||||
|
fromFieldPath:
|
||||||
|
description: |-
|
||||||
|
FromFieldPath is the path of the field on the resource whose value is
|
||||||
|
to be used as input. Required when type is FromCompositeFieldPath or
|
||||||
|
ToCompositeFieldPath.
|
||||||
|
type: string
|
||||||
|
policy:
|
||||||
|
description: Policy configures the specifics of patching
|
||||||
|
behaviour.
|
||||||
|
properties:
|
||||||
|
fromFieldPath:
|
||||||
|
description: |-
|
||||||
|
FromFieldPath specifies how to patch from a field path. The default is
|
||||||
|
'Optional', which means the patch will be a no-op if the specified
|
||||||
|
fromFieldPath does not exist. Use 'Required' if the patch should fail if
|
||||||
|
the specified path does not exist.
|
||||||
|
enum:
|
||||||
|
- Optional
|
||||||
|
- Required
|
||||||
|
type: string
|
||||||
|
mergeOptions:
|
||||||
|
description: MergeOptions Specifies merge options on
|
||||||
|
a field path
|
||||||
|
properties:
|
||||||
|
appendSlice:
|
||||||
|
description: Specifies that already existing elements
|
||||||
|
in a merged slice should be preserved
|
||||||
|
type: boolean
|
||||||
|
keepMapValues:
|
||||||
|
description: Specifies that already existing values
|
||||||
|
in a merged map should be preserved
|
||||||
|
type: boolean
|
||||||
|
type: object
|
||||||
|
type: object
|
||||||
|
toFieldPath:
|
||||||
|
description: |-
|
||||||
|
ToFieldPath is the path of the field on the resource whose value will
|
||||||
|
be changed with the result of transforms. Leave empty if you'd like to
|
||||||
|
propagate to the same path as fromFieldPath.
|
||||||
|
type: string
|
||||||
|
transforms:
|
||||||
|
description: |-
|
||||||
|
Transforms are the list of functions that are used as a FIFO pipe for the
|
||||||
|
input to be transformed.
|
||||||
|
items:
|
||||||
|
description: |-
|
||||||
|
Transform is a unit of process whose input is transformed into an output with
|
||||||
|
the supplied configuration.
|
||||||
|
properties:
|
||||||
|
convert:
|
||||||
|
description: Convert is used to cast the input into
|
||||||
|
the given output type.
|
||||||
|
properties:
|
||||||
|
format:
|
||||||
|
description: |-
|
||||||
|
The expected input format.
|
||||||
|
|
||||||
|
|
||||||
|
* `quantity` - parses the input as a K8s [`resource.Quantity`](https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#Quantity).
|
||||||
|
Only used during `string -> float64` conversions.
|
||||||
|
* `json` - parses the input as a JSON string.
|
||||||
|
Only used during `string -> object` or `string -> list` conversions.
|
||||||
|
|
||||||
|
|
||||||
|
If this property is null, the default conversion is applied.
|
||||||
|
enum:
|
||||||
|
- none
|
||||||
|
- quantity
|
||||||
|
- json
|
||||||
|
type: string
|
||||||
|
toType:
|
||||||
|
description: ToType is the type of the output
|
||||||
|
of this transform.
|
||||||
|
enum:
|
||||||
|
- string
|
||||||
|
- int
|
||||||
|
- int64
|
||||||
|
- bool
|
||||||
|
- float64
|
||||||
|
- object
|
||||||
|
- array
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- toType
|
||||||
|
type: object
|
||||||
|
map:
|
||||||
|
additionalProperties:
|
||||||
|
x-kubernetes-preserve-unknown-fields: true
|
||||||
|
description: Map uses the input as a key in the given
|
||||||
|
map and returns the value.
|
||||||
|
type: object
|
||||||
|
match:
|
||||||
|
description: Match is a more complex version of Map
|
||||||
|
that matches a list of patterns.
|
||||||
|
properties:
|
||||||
|
fallbackTo:
|
||||||
|
default: Value
|
||||||
|
description: Determines to what value the transform
|
||||||
|
should fallback if no pattern matches.
|
||||||
|
enum:
|
||||||
|
- Value
|
||||||
|
- Input
|
||||||
|
type: string
|
||||||
|
fallbackValue:
|
||||||
|
description: |-
|
||||||
|
The fallback value that should be returned by the transform if now pattern
|
||||||
|
matches.
|
||||||
|
x-kubernetes-preserve-unknown-fields: true
|
||||||
|
patterns:
|
||||||
|
description: |-
|
||||||
|
The patterns that should be tested against the input string.
|
||||||
|
Patterns are tested in order. The value of the first match is used as
|
||||||
|
result of this transform.
|
||||||
|
items:
|
||||||
|
description: |-
|
||||||
|
MatchTransformPattern is a transform that returns the value that matches a
|
||||||
|
pattern.
|
||||||
|
properties:
|
||||||
|
literal:
|
||||||
|
description: |-
|
||||||
|
Literal exactly matches the input string (case sensitive).
|
||||||
|
Is required if `type` is `literal`.
|
||||||
|
type: string
|
||||||
|
regexp:
|
||||||
|
description: |-
|
||||||
|
Regexp to match against the input string.
|
||||||
|
Is required if `type` is `regexp`.
|
||||||
|
type: string
|
||||||
|
result:
|
||||||
|
description: The value that is used as result
|
||||||
|
of the transform if the pattern matches.
|
||||||
|
x-kubernetes-preserve-unknown-fields: true
|
||||||
|
type:
|
||||||
|
default: literal
|
||||||
|
description: |-
|
||||||
|
Type specifies how the pattern matches the input.
|
||||||
|
|
||||||
|
|
||||||
|
* `literal` - the pattern value has to exactly match (case sensitive) the
|
||||||
|
input string. This is the default.
|
||||||
|
|
||||||
|
|
||||||
|
* `regexp` - the pattern treated as a regular expression against
|
||||||
|
which the input string is tested. Crossplane will throw an error if the
|
||||||
|
key is not a valid regexp.
|
||||||
|
enum:
|
||||||
|
- literal
|
||||||
|
- regexp
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- result
|
||||||
|
- type
|
||||||
|
type: object
|
||||||
|
type: array
|
||||||
|
type: object
|
||||||
|
math:
|
||||||
|
description: |-
|
||||||
|
Math is used to transform the input via mathematical operations such as
|
||||||
|
multiplication.
|
||||||
|
properties:
|
||||||
|
clampMax:
|
||||||
|
description: ClampMax makes sure that the value
|
||||||
|
is not bigger than the given value.
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
clampMin:
|
||||||
|
description: ClampMin makes sure that the value
|
||||||
|
is not smaller than the given value.
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
multiply:
|
||||||
|
description: Multiply the value.
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
type:
|
||||||
|
default: Multiply
|
||||||
|
description: Type of the math transform to be
|
||||||
|
run.
|
||||||
|
enum:
|
||||||
|
- Multiply
|
||||||
|
- ClampMin
|
||||||
|
- ClampMax
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
string:
|
||||||
|
description: |-
|
||||||
|
String is used to transform the input into a string or a different kind
|
||||||
|
of string. Note that the input does not necessarily need to be a string.
|
||||||
|
properties:
|
||||||
|
convert:
|
||||||
|
description: |-
|
||||||
|
Optional conversion method to be specified.
|
||||||
|
`ToUpper` and `ToLower` change the letter case of the input string.
|
||||||
|
`ToBase64` and `FromBase64` perform a base64 conversion based on the input string.
|
||||||
|
`ToJson` converts any input value into its raw JSON representation.
|
||||||
|
`ToSha1`, `ToSha256` and `ToSha512` generate a hash value based on the input
|
||||||
|
converted to JSON.
|
||||||
|
`ToAdler32` generate a addler32 hash based on the input string.
|
||||||
|
enum:
|
||||||
|
- ToUpper
|
||||||
|
- ToLower
|
||||||
|
- ToBase64
|
||||||
|
- FromBase64
|
||||||
|
- ToJson
|
||||||
|
- ToSha1
|
||||||
|
- ToSha256
|
||||||
|
- ToSha512
|
||||||
|
- ToAdler32
|
||||||
|
type: string
|
||||||
|
fmt:
|
||||||
|
description: |-
|
||||||
|
Format the input using a Go format string. See
|
||||||
|
https://golang.org/pkg/fmt/ for details.
|
||||||
|
type: string
|
||||||
|
join:
|
||||||
|
description: Join defines parameters to join a
|
||||||
|
slice of values to a string.
|
||||||
|
properties:
|
||||||
|
separator:
|
||||||
|
description: |-
|
||||||
|
Separator defines the character that should separate the values from each
|
||||||
|
other in the joined string.
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- separator
|
||||||
|
type: object
|
||||||
|
regexp:
|
||||||
|
description: Extract a match from the input using
|
||||||
|
a regular expression.
|
||||||
|
properties:
|
||||||
|
group:
|
||||||
|
description: Group number to match. 0 (the
|
||||||
|
default) matches the entire expression.
|
||||||
|
type: integer
|
||||||
|
match:
|
||||||
|
description: |-
|
||||||
|
Match string. May optionally include submatches, aka capture groups.
|
||||||
|
See https://pkg.go.dev/regexp/ for details.
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- match
|
||||||
|
type: object
|
||||||
|
trim:
|
||||||
|
description: Trim the prefix or suffix from the
|
||||||
|
input
|
||||||
|
type: string
|
||||||
|
type:
|
||||||
|
default: Format
|
||||||
|
description: Type of the string transform to be
|
||||||
|
run.
|
||||||
|
enum:
|
||||||
|
- Format
|
||||||
|
- Convert
|
||||||
|
- TrimPrefix
|
||||||
|
- TrimSuffix
|
||||||
|
- Regexp
|
||||||
|
- Join
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
type:
|
||||||
|
description: Type of the transform to be run.
|
||||||
|
enum:
|
||||||
|
- map
|
||||||
|
- match
|
||||||
|
- math
|
||||||
|
- string
|
||||||
|
- convert
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- type
|
||||||
|
type: object
|
||||||
|
type: array
|
||||||
|
type:
|
||||||
|
default: FromCompositeFieldPath
|
||||||
|
description: |-
|
||||||
|
Type sets the patching behaviour to be used. Each patch type may require
|
||||||
|
its own fields to be set on the Patch object.
|
||||||
|
enum:
|
||||||
|
- FromCompositeFieldPath
|
||||||
|
- ToCompositeFieldPath
|
||||||
|
- CombineFromComposite
|
||||||
|
- CombineToComposite
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
type: array
|
||||||
|
policy:
|
||||||
|
description: |-
|
||||||
|
Policy represents the Resolve and Resolution policies which apply to
|
||||||
|
all EnvironmentSourceReferences in EnvironmentConfigs list.
|
||||||
|
properties:
|
||||||
|
resolution:
|
||||||
|
default: Required
|
||||||
|
description: |-
|
||||||
|
Resolution specifies whether resolution of this reference is required.
|
||||||
|
The default is 'Required', which means the reconcile will fail if the
|
||||||
|
reference cannot be resolved. 'Optional' means this reference will be
|
||||||
|
a no-op if it cannot be resolved.
|
||||||
|
enum:
|
||||||
|
- Required
|
||||||
|
- Optional
|
||||||
|
type: string
|
||||||
|
resolve:
|
||||||
|
description: |-
|
||||||
|
Resolve specifies when this reference should be resolved. The default
|
||||||
|
is 'IfNotPresent', which will attempt to resolve the reference only when
|
||||||
|
the corresponding field is not present. Use 'Always' to resolve the
|
||||||
|
reference on every reconcile.
|
||||||
|
enum:
|
||||||
|
- Always
|
||||||
|
- IfNotPresent
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
type: object
|
||||||
mode:
|
mode:
|
||||||
default: Resources
|
default: Resources
|
||||||
description: |-
|
description: |-
|
||||||
Mode controls what type or "mode" of Composition will be used.
|
Mode controls what type or "mode" of Composition will be used.
|
||||||
|
|
||||||
"Pipeline" indicates that a Composition specifies a pipeline of
|
|
||||||
Composition Functions, each of which is responsible for producing
|
|
||||||
composed resources that Crossplane should create or update.
|
|
||||||
|
|
||||||
"Resources" indicates that a Composition uses what is commonly referred
|
"Resources" (the default) indicates that a Composition uses what is
|
||||||
to as "Patch & Transform" or P&T composition. This mode of Composition
|
commonly referred to as "Patch & Transform" or P&T composition. This mode
|
||||||
uses an array of resources, each a template for a composed resource.
|
of Composition uses an array of resources, each a template for a composed
|
||||||
|
resource.
|
||||||
|
|
||||||
All Compositions should use Pipeline mode. Resources mode is deprecated.
|
|
||||||
Resources mode won't be removed in Crossplane 1.x, and will remain the
|
"Pipeline" indicates that a Composition specifies a pipeline
|
||||||
default to avoid breaking legacy Compositions. However, it's no longer
|
of Composition Functions, each of which is responsible for producing
|
||||||
accepting new features, and only accepting security related bug fixes.
|
composed resources that Crossplane should create or update. THE PIPELINE
|
||||||
|
MODE IS A BETA FEATURE. It is not honored if the relevant Crossplane
|
||||||
|
feature flag is disabled.
|
||||||
enum:
|
enum:
|
||||||
- Resources
|
- Resources
|
||||||
- Pipeline
|
- Pipeline
|
||||||
|
@ -103,10 +594,9 @@ spec:
|
||||||
resource in this Composition. PatchSets cannot themselves refer to other
|
resource in this Composition. PatchSets cannot themselves refer to other
|
||||||
PatchSets.
|
PatchSets.
|
||||||
|
|
||||||
|
|
||||||
PatchSets are only used by the "Resources" mode of Composition. They
|
PatchSets are only used by the "Resources" mode of Composition. They
|
||||||
are ignored by other modes.
|
are ignored by other modes.
|
||||||
|
|
||||||
Deprecated: Use Composition Functions instead.
|
|
||||||
items:
|
items:
|
||||||
description: |-
|
description: |-
|
||||||
A PatchSet is a set of patches that can be reused from all resources within
|
A PatchSet is a set of patches that can be reused from all resources within
|
||||||
|
@ -127,8 +617,8 @@ spec:
|
||||||
properties:
|
properties:
|
||||||
combine:
|
combine:
|
||||||
description: |-
|
description: |-
|
||||||
Combine is the patch configuration for a CombineFromComposite or
|
Combine is the patch configuration for a CombineFromComposite,
|
||||||
CombineToComposite patch.
|
CombineFromEnvironment, CombineToComposite or CombineToEnvironment patch.
|
||||||
properties:
|
properties:
|
||||||
strategy:
|
strategy:
|
||||||
description: |-
|
description: |-
|
||||||
|
@ -177,8 +667,8 @@ spec:
|
||||||
fromFieldPath:
|
fromFieldPath:
|
||||||
description: |-
|
description: |-
|
||||||
FromFieldPath is the path of the field on the resource whose value is
|
FromFieldPath is the path of the field on the resource whose value is
|
||||||
to be used as input. Required when type is FromCompositeFieldPath or
|
to be used as input. Required when type is FromCompositeFieldPath,
|
||||||
ToCompositeFieldPath.
|
FromEnvironmentFieldPath, ToCompositeFieldPath, ToEnvironmentFieldPath.
|
||||||
type: string
|
type: string
|
||||||
patchSetName:
|
patchSetName:
|
||||||
description: PatchSetName to include patches from. Required
|
description: PatchSetName to include patches from. Required
|
||||||
|
@ -200,7 +690,7 @@ spec:
|
||||||
type: string
|
type: string
|
||||||
mergeOptions:
|
mergeOptions:
|
||||||
description: MergeOptions Specifies merge options
|
description: MergeOptions Specifies merge options
|
||||||
on a field path.
|
on a field path
|
||||||
properties:
|
properties:
|
||||||
appendSlice:
|
appendSlice:
|
||||||
description: Specifies that already existing elements
|
description: Specifies that already existing elements
|
||||||
|
@ -235,11 +725,13 @@ spec:
|
||||||
description: |-
|
description: |-
|
||||||
The expected input format.
|
The expected input format.
|
||||||
|
|
||||||
|
|
||||||
* `quantity` - parses the input as a K8s [`resource.Quantity`](https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#Quantity).
|
* `quantity` - parses the input as a K8s [`resource.Quantity`](https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#Quantity).
|
||||||
Only used during `string -> float64` conversions.
|
Only used during `string -> float64` conversions.
|
||||||
* `json` - parses the input as a JSON string.
|
* `json` - parses the input as a JSON string.
|
||||||
Only used during `string -> object` or `string -> list` conversions.
|
Only used during `string -> object` or `string -> list` conversions.
|
||||||
|
|
||||||
|
|
||||||
If this property is null, the default conversion is applied.
|
If this property is null, the default conversion is applied.
|
||||||
enum:
|
enum:
|
||||||
- none
|
- none
|
||||||
|
@ -314,9 +806,11 @@ spec:
|
||||||
description: |-
|
description: |-
|
||||||
Type specifies how the pattern matches the input.
|
Type specifies how the pattern matches the input.
|
||||||
|
|
||||||
|
|
||||||
* `literal` - the pattern value has to exactly match (case sensitive) the
|
* `literal` - the pattern value has to exactly match (case sensitive) the
|
||||||
input string. This is the default.
|
input string. This is the default.
|
||||||
|
|
||||||
|
|
||||||
* `regexp` - the pattern treated as a regular expression against
|
* `regexp` - the pattern treated as a regular expression against
|
||||||
which the input string is tested. Crossplane will throw an error if the
|
which the input string is tested. Crossplane will throw an error if the
|
||||||
key is not a valid regexp.
|
key is not a valid regexp.
|
||||||
|
@ -454,10 +948,14 @@ spec:
|
||||||
its own fields to be set on the Patch object.
|
its own fields to be set on the Patch object.
|
||||||
enum:
|
enum:
|
||||||
- FromCompositeFieldPath
|
- FromCompositeFieldPath
|
||||||
|
- FromEnvironmentFieldPath
|
||||||
- PatchSet
|
- PatchSet
|
||||||
- ToCompositeFieldPath
|
- ToCompositeFieldPath
|
||||||
|
- ToEnvironmentFieldPath
|
||||||
|
- CombineFromEnvironment
|
||||||
- CombineFromComposite
|
- CombineFromComposite
|
||||||
- CombineToComposite
|
- CombineToComposite
|
||||||
|
- CombineToEnvironment
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
type: array
|
type: array
|
||||||
|
@ -472,51 +970,16 @@ spec:
|
||||||
composite resource referring to this composition is created. One of
|
composite resource referring to this composition is created. One of
|
||||||
resources and pipeline must be specified - you cannot specify both.
|
resources and pipeline must be specified - you cannot specify both.
|
||||||
|
|
||||||
|
|
||||||
The Pipeline is only used by the "Pipeline" mode of Composition. It is
|
The Pipeline is only used by the "Pipeline" mode of Composition. It is
|
||||||
ignored by other modes.
|
ignored by other modes.
|
||||||
|
|
||||||
|
|
||||||
|
THIS IS A BETA FIELD. It is not honored if the relevant Crossplane
|
||||||
|
feature flag is disabled.
|
||||||
items:
|
items:
|
||||||
description: A PipelineStep in a Composition Function pipeline.
|
description: A PipelineStep in a Composition Function pipeline.
|
||||||
properties:
|
properties:
|
||||||
credentials:
|
|
||||||
description: Credentials are optional credentials that the Composition
|
|
||||||
Function needs.
|
|
||||||
items:
|
|
||||||
description: |-
|
|
||||||
FunctionCredentials are optional credentials that a Composition Function
|
|
||||||
needs to run.
|
|
||||||
properties:
|
|
||||||
name:
|
|
||||||
description: Name of this set of credentials.
|
|
||||||
type: string
|
|
||||||
secretRef:
|
|
||||||
description: |-
|
|
||||||
A SecretRef is a reference to a secret containing credentials that should
|
|
||||||
be supplied to the function.
|
|
||||||
properties:
|
|
||||||
name:
|
|
||||||
description: Name of the secret.
|
|
||||||
type: string
|
|
||||||
namespace:
|
|
||||||
description: Namespace of the secret.
|
|
||||||
type: string
|
|
||||||
required:
|
|
||||||
- name
|
|
||||||
- namespace
|
|
||||||
type: object
|
|
||||||
source:
|
|
||||||
description: Source of the function credentials.
|
|
||||||
enum:
|
|
||||||
- None
|
|
||||||
- Secret
|
|
||||||
type: string
|
|
||||||
required:
|
|
||||||
- name
|
|
||||||
- source
|
|
||||||
type: object
|
|
||||||
type: array
|
|
||||||
x-kubernetes-list-map-keys:
|
|
||||||
- name
|
|
||||||
x-kubernetes-list-type: map
|
|
||||||
functionRef:
|
functionRef:
|
||||||
description: |-
|
description: |-
|
||||||
FunctionRef is a reference to the Composition Function this step should
|
FunctionRef is a reference to the Composition Function this step should
|
||||||
|
@ -544,9 +1007,6 @@ spec:
|
||||||
- step
|
- step
|
||||||
type: object
|
type: object
|
||||||
type: array
|
type: array
|
||||||
x-kubernetes-list-map-keys:
|
|
||||||
- step
|
|
||||||
x-kubernetes-list-type: map
|
|
||||||
publishConnectionDetailsWithStoreConfigRef:
|
publishConnectionDetailsWithStoreConfigRef:
|
||||||
default:
|
default:
|
||||||
name: default
|
name: default
|
||||||
|
@ -555,6 +1015,7 @@ spec:
|
||||||
with which the connection details of composite resources dynamically
|
with which the connection details of composite resources dynamically
|
||||||
provisioned using this composition will be published.
|
provisioned using this composition will be published.
|
||||||
|
|
||||||
|
|
||||||
THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored
|
THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored
|
||||||
unless the relevant Crossplane feature flag is enabled, and may be
|
unless the relevant Crossplane feature flag is enabled, and may be
|
||||||
changed or removed without notice.
|
changed or removed without notice.
|
||||||
|
@ -570,10 +1031,9 @@ spec:
|
||||||
Resources is a list of resource templates that will be used when a
|
Resources is a list of resource templates that will be used when a
|
||||||
composite resource referring to this composition is created.
|
composite resource referring to this composition is created.
|
||||||
|
|
||||||
|
|
||||||
Resources are only used by the "Resources" mode of Composition. They are
|
Resources are only used by the "Resources" mode of Composition. They are
|
||||||
ignored by other modes.
|
ignored by other modes.
|
||||||
|
|
||||||
Deprecated: Use Composition Functions instead.
|
|
||||||
items:
|
items:
|
||||||
description: |-
|
description: |-
|
||||||
ComposedTemplate is used to provide information about how the composed resource
|
ComposedTemplate is used to provide information about how the composed resource
|
||||||
|
@ -655,8 +1115,8 @@ spec:
|
||||||
properties:
|
properties:
|
||||||
combine:
|
combine:
|
||||||
description: |-
|
description: |-
|
||||||
Combine is the patch configuration for a CombineFromComposite or
|
Combine is the patch configuration for a CombineFromComposite,
|
||||||
CombineToComposite patch.
|
CombineFromEnvironment, CombineToComposite or CombineToEnvironment patch.
|
||||||
properties:
|
properties:
|
||||||
strategy:
|
strategy:
|
||||||
description: |-
|
description: |-
|
||||||
|
@ -705,8 +1165,8 @@ spec:
|
||||||
fromFieldPath:
|
fromFieldPath:
|
||||||
description: |-
|
description: |-
|
||||||
FromFieldPath is the path of the field on the resource whose value is
|
FromFieldPath is the path of the field on the resource whose value is
|
||||||
to be used as input. Required when type is FromCompositeFieldPath or
|
to be used as input. Required when type is FromCompositeFieldPath,
|
||||||
ToCompositeFieldPath.
|
FromEnvironmentFieldPath, ToCompositeFieldPath, ToEnvironmentFieldPath.
|
||||||
type: string
|
type: string
|
||||||
patchSetName:
|
patchSetName:
|
||||||
description: PatchSetName to include patches from. Required
|
description: PatchSetName to include patches from. Required
|
||||||
|
@ -728,7 +1188,7 @@ spec:
|
||||||
type: string
|
type: string
|
||||||
mergeOptions:
|
mergeOptions:
|
||||||
description: MergeOptions Specifies merge options
|
description: MergeOptions Specifies merge options
|
||||||
on a field path.
|
on a field path
|
||||||
properties:
|
properties:
|
||||||
appendSlice:
|
appendSlice:
|
||||||
description: Specifies that already existing elements
|
description: Specifies that already existing elements
|
||||||
|
@ -763,11 +1223,13 @@ spec:
|
||||||
description: |-
|
description: |-
|
||||||
The expected input format.
|
The expected input format.
|
||||||
|
|
||||||
|
|
||||||
* `quantity` - parses the input as a K8s [`resource.Quantity`](https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#Quantity).
|
* `quantity` - parses the input as a K8s [`resource.Quantity`](https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#Quantity).
|
||||||
Only used during `string -> float64` conversions.
|
Only used during `string -> float64` conversions.
|
||||||
* `json` - parses the input as a JSON string.
|
* `json` - parses the input as a JSON string.
|
||||||
Only used during `string -> object` or `string -> list` conversions.
|
Only used during `string -> object` or `string -> list` conversions.
|
||||||
|
|
||||||
|
|
||||||
If this property is null, the default conversion is applied.
|
If this property is null, the default conversion is applied.
|
||||||
enum:
|
enum:
|
||||||
- none
|
- none
|
||||||
|
@ -842,9 +1304,11 @@ spec:
|
||||||
description: |-
|
description: |-
|
||||||
Type specifies how the pattern matches the input.
|
Type specifies how the pattern matches the input.
|
||||||
|
|
||||||
|
|
||||||
* `literal` - the pattern value has to exactly match (case sensitive) the
|
* `literal` - the pattern value has to exactly match (case sensitive) the
|
||||||
input string. This is the default.
|
input string. This is the default.
|
||||||
|
|
||||||
|
|
||||||
* `regexp` - the pattern treated as a regular expression against
|
* `regexp` - the pattern treated as a regular expression against
|
||||||
which the input string is tested. Crossplane will throw an error if the
|
which the input string is tested. Crossplane will throw an error if the
|
||||||
key is not a valid regexp.
|
key is not a valid regexp.
|
||||||
|
@ -982,10 +1446,14 @@ spec:
|
||||||
its own fields to be set on the Patch object.
|
its own fields to be set on the Patch object.
|
||||||
enum:
|
enum:
|
||||||
- FromCompositeFieldPath
|
- FromCompositeFieldPath
|
||||||
|
- FromEnvironmentFieldPath
|
||||||
- PatchSet
|
- PatchSet
|
||||||
- ToCompositeFieldPath
|
- ToCompositeFieldPath
|
||||||
|
- ToEnvironmentFieldPath
|
||||||
|
- CombineFromEnvironment
|
||||||
- CombineFromComposite
|
- CombineFromComposite
|
||||||
- CombineToComposite
|
- CombineToComposite
|
||||||
|
- CombineToEnvironment
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
type: array
|
type: array
|
||||||
|
@ -1002,7 +1470,7 @@ spec:
|
||||||
items:
|
items:
|
||||||
description: |-
|
description: |-
|
||||||
ReadinessCheck is used to indicate how to tell whether a resource is ready
|
ReadinessCheck is used to indicate how to tell whether a resource is ready
|
||||||
for consumption.
|
for consumption
|
||||||
properties:
|
properties:
|
||||||
fieldPath:
|
fieldPath:
|
||||||
description: FieldPath shows the path of the field whose
|
description: FieldPath shows the path of the field whose
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
---
|
|
||||||
apiVersion: apiextensions.k8s.io/v1
|
apiVersion: apiextensions.k8s.io/v1
|
||||||
kind: CustomResourceDefinition
|
kind: CustomResourceDefinition
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
annotations:
|
||||||
controller-gen.kubebuilder.io/version: v0.16.5
|
controller-gen.kubebuilder.io/version: v0.14.0
|
||||||
name: environmentconfigs.apiextensions.crossplane.io
|
name: environmentconfigs.apiextensions.crossplane.io
|
||||||
spec:
|
spec:
|
||||||
group: apiextensions.crossplane.io
|
group: apiextensions.crossplane.io
|
||||||
|
@ -25,54 +24,8 @@ spec:
|
||||||
name: v1alpha1
|
name: v1alpha1
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
description: |-
|
description: A EnvironmentConfig contains a set of arbitrary, unstructured
|
||||||
An EnvironmentConfig contains user-defined unstructured values for
|
values.
|
||||||
use in a Composition.
|
|
||||||
|
|
||||||
Read the Crossplane documentation for
|
|
||||||
[more information about EnvironmentConfigs](https://docs.crossplane.io/latest/concepts/environment-configs).
|
|
||||||
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
|
|
||||||
data:
|
|
||||||
additionalProperties:
|
|
||||||
x-kubernetes-preserve-unknown-fields: true
|
|
||||||
description: |-
|
|
||||||
The data of this EnvironmentConfig.
|
|
||||||
This may contain any kind of structure that can be serialized into JSON.
|
|
||||||
type: object
|
|
||||||
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
|
|
||||||
type: object
|
|
||||||
served: true
|
|
||||||
storage: false
|
|
||||||
subresources: {}
|
|
||||||
- additionalPrinterColumns:
|
|
||||||
- jsonPath: .metadata.creationTimestamp
|
|
||||||
name: AGE
|
|
||||||
type: date
|
|
||||||
name: v1beta1
|
|
||||||
schema:
|
|
||||||
openAPIV3Schema:
|
|
||||||
description: |-
|
|
||||||
An EnvironmentConfig contains user-defined unstructured values for
|
|
||||||
use in a Composition.
|
|
||||||
|
|
||||||
Read the Crossplane documentation for
|
|
||||||
[more information about EnvironmentConfigs](https://docs.crossplane.io/latest/concepts/environment-configs).
|
|
||||||
properties:
|
properties:
|
||||||
apiVersion:
|
apiVersion:
|
||||||
description: |-
|
description: |-
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
---
|
|
||||||
apiVersion: apiextensions.k8s.io/v1
|
apiVersion: apiextensions.k8s.io/v1
|
||||||
kind: CustomResourceDefinition
|
kind: CustomResourceDefinition
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
annotations:
|
||||||
controller-gen.kubebuilder.io/version: v0.16.5
|
controller-gen.kubebuilder.io/version: v0.14.0
|
||||||
name: usages.apiextensions.crossplane.io
|
name: usages.apiextensions.crossplane.io
|
||||||
spec:
|
spec:
|
||||||
group: apiextensions.crossplane.io
|
group: apiextensions.crossplane.io
|
||||||
|
@ -29,14 +28,8 @@ spec:
|
||||||
name: v1alpha1
|
name: v1alpha1
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
description: |-
|
description: A Usage defines a deletion blocking relationship between two
|
||||||
A Usage defines a deletion blocking relationship between two resources.
|
resources.
|
||||||
|
|
||||||
Usages prevent accidental deletion of a single resource or deletion of
|
|
||||||
resources with dependent resources.
|
|
||||||
|
|
||||||
Read the Crossplane documentation for
|
|
||||||
[more information about Compositions](https://docs.crossplane.io/latest/concepts/usages).
|
|
||||||
properties:
|
properties:
|
||||||
apiVersion:
|
apiVersion:
|
||||||
description: |-
|
description: |-
|
||||||
|
@ -175,13 +168,6 @@ spec:
|
||||||
A Message containing details about this condition's last transition from
|
A Message containing details about this condition's last transition from
|
||||||
one status to another, if any.
|
one status to another, if any.
|
||||||
type: string
|
type: string
|
||||||
observedGeneration:
|
|
||||||
description: |-
|
|
||||||
ObservedGeneration represents the .metadata.generation that the condition was set based upon.
|
|
||||||
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
|
|
||||||
with respect to the current state of the instance.
|
|
||||||
format: int64
|
|
||||||
type: integer
|
|
||||||
reason:
|
reason:
|
||||||
description: A Reason for this condition's last transition from
|
description: A Reason for this condition's last transition from
|
||||||
one status to another.
|
one status to another.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
release="v1.18.0"
|
release="release-1.15"
|
||||||
|
|
||||||
apiextensions=$(gh api --jq '.[].name' "/repos/crossplane/crossplane/contents/cluster/crds?ref=${release}" | grep apiextensions)
|
apiextensions=$(gh api --jq '.[].name' "/repos/crossplane/crossplane/contents/cluster/crds?ref=${release}" | grep apiextensions)
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package io.crossplane.compositefunctions.base;
|
package io.crossplane.compositefunctions.base;
|
||||||
|
|
||||||
|
|
||||||
import io.crossplane.compositefunctions.protobuf.v1.FunctionRunnerServiceGrpc;
|
import io.crossplane.compositefunctions.protobuf.FunctionRunnerServiceGrpc;
|
||||||
import io.crossplane.compositefunctions.protobuf.v1.Requirements;
|
import io.crossplane.compositefunctions.protobuf.Requirements;
|
||||||
import io.crossplane.compositefunctions.protobuf.v1.RunFunctionRequest;
|
import io.crossplane.compositefunctions.protobuf.RunFunctionRequest;
|
||||||
import io.crossplane.compositefunctions.protobuf.v1.RunFunctionResponse;
|
import io.crossplane.compositefunctions.protobuf.RunFunctionResponse;
|
||||||
import io.crossplane.compositefunctions.protobuf.v1.State;
|
import io.crossplane.compositefunctions.protobuf.State;
|
||||||
import io.grpc.stub.StreamObserver;
|
import io.grpc.stub.StreamObserver;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
@ -33,8 +33,9 @@ public abstract class CrossplaneCompositeFunctionBase extends FunctionRunnerServ
|
||||||
desiredBuilder.putAllResources(desired.getResourcesMap());
|
desiredBuilder.putAllResources(desired.getResourcesMap());
|
||||||
|
|
||||||
CrossplaneFunctionRequest crossplaneFunctionRequest = new CrossplaneFunctionRequest(request.getObserved(),
|
CrossplaneFunctionRequest crossplaneFunctionRequest = new CrossplaneFunctionRequest(request.getObserved(),
|
||||||
request.getExtraResourcesMap(), request.getCredentialsMap(), request.getDesired());
|
request.getExtraResourcesMap(), request.getDesired());
|
||||||
|
|
||||||
|
// request.getCredentialsMap(),
|
||||||
|
|
||||||
logger.debug("Calling method with implemented logic");
|
logger.debug("Calling method with implemented logic");
|
||||||
CrossplaneFunctionResponse crossplaneFunctionResponse = runFunction(crossplaneFunctionRequest);
|
CrossplaneFunctionResponse crossplaneFunctionResponse = runFunction(crossplaneFunctionRequest);
|
||||||
|
@ -54,14 +55,11 @@ public abstract class CrossplaneCompositeFunctionBase extends FunctionRunnerServ
|
||||||
responseBuilder.setRequirements(requirements);
|
responseBuilder.setRequirements(requirements);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (! crossplaneFunctionResponse.results().isEmpty()) {
|
if (! crossplaneFunctionResponse.results().isEmpty()) {
|
||||||
responseBuilder.addAllResults(crossplaneFunctionResponse.results());
|
responseBuilder.addAllResults(crossplaneFunctionResponse.results());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! crossplaneFunctionResponse.conditions().isEmpty()) {
|
|
||||||
responseBuilder.addAllConditions(crossplaneFunctionResponse.conditions());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (desiredBuilder.getResourcesCount() > 0) {
|
if (desiredBuilder.getResourcesCount() > 0) {
|
||||||
responseBuilder.setDesired(desiredBuilder.build());
|
responseBuilder.setDesired(desiredBuilder.build());
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
package io.crossplane.compositefunctions.base;
|
package io.crossplane.compositefunctions.base;
|
||||||
|
|
||||||
import io.crossplane.compositefunctions.protobuf.v1.Credentials;
|
import io.crossplane.compositefunctions.protobuf.Resources;
|
||||||
import io.crossplane.compositefunctions.protobuf.v1.Resources;
|
import io.crossplane.compositefunctions.protobuf.State;
|
||||||
import io.crossplane.compositefunctions.protobuf.v1.State;
|
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@ -10,10 +9,12 @@ import java.util.Map;
|
||||||
* Holder for the request from crossplane
|
* Holder for the request from crossplane
|
||||||
* @param observedState The observedstate of the crossplane resources
|
* @param observedState The observedstate of the crossplane resources
|
||||||
* @param extraResourcesMap A map of any extra resources requested
|
* @param extraResourcesMap A map of any extra resources requested
|
||||||
* @param credentialsMap A map of credentials sent as input
|
|
||||||
* @param desiredState The sum of previously called functions state. To override, create a new resource with the same name in the response
|
* @param desiredState The sum of previously called functions state. To override, create a new resource with the same name in the response
|
||||||
*/
|
*/
|
||||||
public record CrossplaneFunctionRequest(State observedState, Map<String, Resources> extraResourcesMap,
|
public record CrossplaneFunctionRequest(State observedState, Map<String, Resources> extraResourcesMap, State desiredState) {
|
||||||
Map<String, Credentials> credentialsMap, State desiredState) {
|
|
||||||
|
|
||||||
|
// *
|
||||||
|
// * @param credentialsMap A map of credentials sent as input
|
||||||
|
//
|
||||||
|
// Map<String, Credentials> credentialsMap
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
package io.crossplane.compositefunctions.base;
|
package io.crossplane.compositefunctions.base;
|
||||||
|
|
||||||
import io.crossplane.compositefunctions.protobuf.v1.Condition;
|
import io.crossplane.compositefunctions.protobuf.ResourceSelector;
|
||||||
import io.crossplane.compositefunctions.protobuf.v1.ResourceSelector;
|
import io.crossplane.compositefunctions.protobuf.Result;
|
||||||
import io.crossplane.compositefunctions.protobuf.v1.Result;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -17,7 +16,7 @@ import java.util.Map;
|
||||||
*/
|
*/
|
||||||
public record CrossplaneFunctionResponse(Map<String, Object> desiredResources,
|
public record CrossplaneFunctionResponse(Map<String, Object> desiredResources,
|
||||||
Map<String, ResourceSelector> resourceSelectors,
|
Map<String, ResourceSelector> resourceSelectors,
|
||||||
List<Result> results, List<Condition> conditions) {
|
List<Result> results) {
|
||||||
|
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
@ -27,6 +26,6 @@ public record CrossplaneFunctionResponse(Map<String, Object> desiredResources,
|
||||||
* Create an empty response with all fields initiated
|
* Create an empty response with all fields initiated
|
||||||
*/
|
*/
|
||||||
public CrossplaneFunctionResponse() {
|
public CrossplaneFunctionResponse() {
|
||||||
this(new HashMap<>(), new HashMap<>(), new ArrayList<>(), new ArrayList<>());
|
this(new HashMap<>(), new HashMap<>(), new ArrayList<>());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ package io.crossplane.compositefunctions.base;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.google.protobuf.Struct;
|
import com.google.protobuf.Struct;
|
||||||
import com.google.protobuf.util.JsonFormat;
|
import com.google.protobuf.util.JsonFormat;
|
||||||
import io.crossplane.compositefunctions.protobuf.v1.Resource;
|
import io.crossplane.compositefunctions.protobuf.Resource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper class for converting Java Objects into protobuf Structs within the Resource object
|
* Helper class for converting Java Objects into protobuf Structs within the Resource object
|
||||||
|
|
|
@ -3,8 +3,10 @@ package io.crossplane.compositefunctions.starter.config;
|
||||||
import io.crossplane.compositefunctions.starter.conversion.CrossplaneExtraResourcesService;
|
import io.crossplane.compositefunctions.starter.conversion.CrossplaneExtraResourcesService;
|
||||||
import io.crossplane.compositefunctions.starter.conversion.CrossplaneObservableService;
|
import io.crossplane.compositefunctions.starter.conversion.CrossplaneObservableService;
|
||||||
import io.crossplane.compositefunctions.starter.conversion.CrossplaneResourceService;
|
import io.crossplane.compositefunctions.starter.conversion.CrossplaneResourceService;
|
||||||
|
import org.checkerframework.checker.units.qual.C;
|
||||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.ComponentScan;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Autoconfiguration for the crossplane services.
|
* Autoconfiguration for the crossplane services.
|
||||||
|
|
|
@ -2,8 +2,8 @@ package io.crossplane.compositefunctions.starter.conversion;
|
||||||
|
|
||||||
import com.google.protobuf.util.JsonFormat;
|
import com.google.protobuf.util.JsonFormat;
|
||||||
|
|
||||||
import io.crossplane.compositefunctions.protobuf.v1.ResourceSelector;
|
import io.crossplane.compositefunctions.protobuf.ResourceSelector;
|
||||||
import io.crossplane.compositefunctions.protobuf.v1.Resources;
|
import io.crossplane.compositefunctions.protobuf.Resources;
|
||||||
import io.crossplane.compositefunctions.starter.exception.CrossplaneUnmarshallException;
|
import io.crossplane.compositefunctions.starter.exception.CrossplaneUnmarshallException;
|
||||||
import io.fabric8.kubernetes.api.model.HasMetadata;
|
import io.fabric8.kubernetes.api.model.HasMetadata;
|
||||||
import io.fabric8.kubernetes.client.utils.Serialization;
|
import io.fabric8.kubernetes.client.utils.Serialization;
|
||||||
|
@ -11,12 +11,10 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class that helps with the extra resources map and also to create ResourceSelector in order to get extra resources
|
* Class that helps with the extra resources map and also to create ResourceSelector in order to get extra resources
|
||||||
* to the function
|
* to the function
|
||||||
|
@ -58,39 +56,6 @@ public class CrossplaneExtraResourcesService {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, String> getConnectionDetails(Map<String, Resources> extraResources, String resourceName) {
|
|
||||||
List<Map<String, String>> resources = getConnectionDetails(extraResources, resourceName, 1);
|
|
||||||
|
|
||||||
if (resources.isEmpty()) {
|
|
||||||
return new HashMap<>();
|
|
||||||
}
|
|
||||||
return resources.get(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<Map<String, String>> getConnectionDetails(Map<String, Resources> extraResources, String resourceName, int expectedResources) {
|
|
||||||
List<Map<String, String>> result = new ArrayList<>();
|
|
||||||
Resources resources = extraResources.get(resourceName);
|
|
||||||
|
|
||||||
if (resources != null && resources.getItemsCount() == expectedResources) {
|
|
||||||
for (int i = 0; i < expectedResources; i++) {
|
|
||||||
try {
|
|
||||||
logger.debug("We have connectiondetails " + resourceName);
|
|
||||||
Map<String, String> currentDetails = new HashMap<>();
|
|
||||||
resources.getItems(i).getConnectionDetailsMap().forEach((key, value) ->
|
|
||||||
currentDetails.put(key, value.toStringUtf8())
|
|
||||||
);
|
|
||||||
result.add(currentDetails);
|
|
||||||
} catch (Exception e) {
|
|
||||||
throw new CrossplaneUnmarshallException("Error when unmarshalling the connectionDetails", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public Map<String, ResourceSelector> createExtraResourcesSelector(String resourceName, HasMetadata type) {
|
public Map<String, ResourceSelector> createExtraResourcesSelector(String resourceName, HasMetadata type) {
|
||||||
ResourceSelector resourceSelector = ResourceSelector.newBuilder()
|
ResourceSelector resourceSelector = ResourceSelector.newBuilder()
|
||||||
.setApiVersion(type.getApiVersion())
|
.setApiVersion(type.getApiVersion())
|
||||||
|
|
|
@ -2,15 +2,13 @@ package io.crossplane.compositefunctions.starter.conversion;
|
||||||
|
|
||||||
|
|
||||||
import com.google.protobuf.util.JsonFormat;
|
import com.google.protobuf.util.JsonFormat;
|
||||||
import io.crossplane.compositefunctions.protobuf.v1.Resource;
|
import io.crossplane.compositefunctions.protobuf.Resource;
|
||||||
import io.crossplane.compositefunctions.protobuf.v1.State;
|
import io.crossplane.compositefunctions.protobuf.State;
|
||||||
import io.crossplane.compositefunctions.starter.exception.CrossplaneUnmarshallException;
|
import io.crossplane.compositefunctions.starter.exception.CrossplaneUnmarshallException;
|
||||||
import io.fabric8.kubernetes.client.utils.Serialization;
|
import io.fabric8.kubernetes.client.utils.Serialization;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -44,22 +42,4 @@ public class CrossplaneObservableService {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, String> getObservableConnectionDetails(String resourceName, State observedState) {
|
|
||||||
Resource observedResource = observedState.getResourcesOrDefault(resourceName, null);
|
|
||||||
Map<String, String> result = new HashMap<>();
|
|
||||||
if (observedResource != null) {
|
|
||||||
try {
|
|
||||||
logger.debug("We have an observed connectionDetails for " + resourceName);
|
|
||||||
observedResource.getConnectionDetailsMap().forEach((key, value) ->
|
|
||||||
result.put(key, value.toStringUtf8())
|
|
||||||
);
|
|
||||||
} catch (Exception e) {
|
|
||||||
|
|
||||||
throw new CrossplaneUnmarshallException("Error when unmarshalling the connectionDetails for " + resourceName, e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package io.crossplane.compositefunctions.starter.conversion;
|
package io.crossplane.compositefunctions.starter.conversion;
|
||||||
|
|
||||||
import com.google.protobuf.util.JsonFormat;
|
import com.google.protobuf.util.JsonFormat;
|
||||||
import io.crossplane.compositefunctions.protobuf.v1.State;
|
import io.crossplane.compositefunctions.protobuf.State;
|
||||||
import io.crossplane.compositefunctions.starter.exception.CrossplaneUnmarshallException;
|
import io.crossplane.compositefunctions.starter.exception.CrossplaneUnmarshallException;
|
||||||
import io.fabric8.kubernetes.client.utils.Serialization;
|
import io.fabric8.kubernetes.client.utils.Serialization;
|
||||||
|
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
package io.crossplane.compositefunctions.starter.exception;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Exception for unexpected items encountered when converting
|
|
||||||
*/
|
|
||||||
public class CrossplaneUnexpectedItemsException extends RuntimeException {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor with message
|
|
||||||
* @param message The exception message
|
|
||||||
*/
|
|
||||||
public CrossplaneUnexpectedItemsException(String message) {
|
|
||||||
super(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor with message and cause
|
|
||||||
* @param message The exception message
|
|
||||||
* @param cause The throwable that caused the exception
|
|
||||||
*/
|
|
||||||
public CrossplaneUnexpectedItemsException(String message, Throwable cause) {
|
|
||||||
super(message, cause);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,13 +1,10 @@
|
||||||
package io.crossplane.compositefunctions.starter.registration;
|
package io.crossplane.compositefunctions.starter.registration;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import com.fasterxml.jackson.databind.JavaType;
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatTypes;
|
import com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatTypes;
|
||||||
import com.fasterxml.jackson.module.jsonSchema.jakarta.JsonSchema;
|
import com.fasterxml.jackson.module.jsonSchema.jakarta.JsonSchema;
|
||||||
import com.fasterxml.jackson.module.jsonSchema.jakarta.JsonSchemaGenerator;
|
import com.fasterxml.jackson.module.jsonSchema.jakarta.JsonSchemaGenerator;
|
||||||
import com.fasterxml.jackson.module.jsonSchema.jakarta.factories.SchemaFactoryWrapper;
|
|
||||||
import com.fasterxml.jackson.module.jsonSchema.jakarta.factories.VisitorContext;
|
|
||||||
import com.fasterxml.jackson.module.jsonSchema.jakarta.types.ArraySchema;
|
import com.fasterxml.jackson.module.jsonSchema.jakarta.types.ArraySchema;
|
||||||
import io.crossplane.apiextensions.v1.compositeresourcedefinitionspec.versions.schema.OpenAPIV3Schema;
|
import io.crossplane.apiextensions.v1.compositeresourcedefinitionspec.versions.schema.OpenAPIV3Schema;
|
||||||
import io.fabric8.kubernetes.api.model.apiextensions.v1.JSONSchemaProps;
|
import io.fabric8.kubernetes.api.model.apiextensions.v1.JSONSchemaProps;
|
||||||
|
@ -32,17 +29,7 @@ public class CrossplaneJsonSchemaGenerator {
|
||||||
//Add mixin class to ignore id field as OpenShift does not support it.
|
//Add mixin class to ignore id field as OpenShift does not support it.
|
||||||
mapper.addMixIn(clazz, mixin);
|
mapper.addMixIn(clazz, mixin);
|
||||||
// apper.addMixIn(ObjectMeta.class, MetadataIgnorer.class);
|
// apper.addMixIn(ObjectMeta.class, MetadataIgnorer.class);
|
||||||
|
JsonSchemaGenerator generator = new JsonSchemaGenerator(mapper);
|
||||||
SchemaFactoryWrapper visitor = new SchemaFactoryWrapper();
|
|
||||||
visitor.setVisitorContext(new VisitorContext(){
|
|
||||||
@Override
|
|
||||||
public String addSeenSchemaUri(JavaType aSeenSchema) {
|
|
||||||
return javaTypeToUrn(aSeenSchema);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
JsonSchemaGenerator generator = new JsonSchemaGenerator(mapper, visitor);
|
|
||||||
JsonSchema jsonSchema = generator.generateSchema(clazz);
|
JsonSchema jsonSchema = generator.generateSchema(clazz);
|
||||||
|
|
||||||
removeIdField(jsonSchema);
|
removeIdField(jsonSchema);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
release="v1.18.0"
|
release="release-1.15"
|
||||||
file="run_function.proto"
|
file="run_function.proto"
|
||||||
gh api -H "Accept: application/vnd.github.raw+json" "/repos/crossplane/crossplane/contents/apis/apiextensions/fn/proto/v1/${file}?ref=${release}" > $file
|
gh api -H "Accept: application/vnd.github.raw+json" "/repos/crossplane/crossplane/contents/apis/apiextensions/fn/proto/v1beta1/${file}?ref=${release}" > $file
|
||||||
|
|
||||||
sed -i '/option go_package/a\option java_package = "io.crossplane.compositefunctions.protobuf.v1";\noption java_multiple_files = true;' $file
|
sed -i '/option go_package/a\option java_package = "io.crossplane.compositefunctions.protobuf";\noption java_multiple_files = true;' $file
|
|
@ -19,10 +19,10 @@ syntax = "proto3";
|
||||||
import "google/protobuf/struct.proto";
|
import "google/protobuf/struct.proto";
|
||||||
import "google/protobuf/duration.proto";
|
import "google/protobuf/duration.proto";
|
||||||
|
|
||||||
package apiextensions.fn.proto.v1;
|
package apiextensions.fn.proto.v1beta1;
|
||||||
|
|
||||||
option go_package = "github.com/crossplane/crossplane/apis/apiextensions/fn/proto/v1";
|
option go_package = "github.com/crossplane/crossplane/apis/apiextensions/fn/proto/v1beta1";
|
||||||
option java_package = "io.crossplane.compositefunctions.protobuf.v1";
|
option java_package = "io.crossplane.compositefunctions.protobuf";
|
||||||
option java_multiple_files = true;
|
option java_multiple_files = true;
|
||||||
|
|
||||||
// A FunctionRunnerService is a Composition Function.
|
// A FunctionRunnerService is a Composition Function.
|
||||||
|
@ -70,24 +70,6 @@ message RunFunctionRequest {
|
||||||
// did not exist, Crossplane sets the map key to an empty Resources message to
|
// did not exist, Crossplane sets the map key to an empty Resources message to
|
||||||
// indicate that it attempted to satisfy the request.
|
// indicate that it attempted to satisfy the request.
|
||||||
map<string, Resources> extra_resources = 6;
|
map<string, Resources> extra_resources = 6;
|
||||||
|
|
||||||
// Optional credentials that this Function may use to communicate with an
|
|
||||||
// external system.
|
|
||||||
map <string, Credentials> credentials = 7;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Credentials that a Function may use to communicate with an external system.
|
|
||||||
message Credentials {
|
|
||||||
// Source of the credentials.
|
|
||||||
oneof source {
|
|
||||||
// Credential data loaded by Crossplane, for example from a Secret.
|
|
||||||
CredentialData credential_data = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// CredentialData loaded by Crossplane, for example from a Secret.
|
|
||||||
message CredentialData {
|
|
||||||
map<string, bytes> data = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resources represents the state of several Crossplane resources.
|
// Resources represents the state of several Crossplane resources.
|
||||||
|
@ -123,10 +105,6 @@ message RunFunctionResponse {
|
||||||
|
|
||||||
// Requirements that must be satisfied for this Function to run successfully.
|
// Requirements that must be satisfied for this Function to run successfully.
|
||||||
Requirements requirements = 5;
|
Requirements requirements = 5;
|
||||||
|
|
||||||
// Status conditions to be applied to the composite resource. Conditions may also
|
|
||||||
// optionally be applied to the composite resource's associated claim.
|
|
||||||
repeated Condition conditions = 6;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// RequestMeta contains metadata pertaining to a RunFunctionRequest.
|
// RequestMeta contains metadata pertaining to a RunFunctionRequest.
|
||||||
|
@ -145,18 +123,11 @@ message Requirements {
|
||||||
|
|
||||||
// ResourceSelector selects a group of resources, either by name or by label.
|
// ResourceSelector selects a group of resources, either by name or by label.
|
||||||
message ResourceSelector {
|
message ResourceSelector {
|
||||||
// API version of resources to select.
|
|
||||||
string api_version = 1;
|
string api_version = 1;
|
||||||
|
|
||||||
// Kind of resources to select.
|
|
||||||
string kind = 2;
|
string kind = 2;
|
||||||
|
|
||||||
// Resources to match.
|
|
||||||
oneof match {
|
oneof match {
|
||||||
// Match the resource with this name.
|
|
||||||
string match_name = 3;
|
string match_name = 3;
|
||||||
|
|
||||||
// Match all resources with these labels.
|
|
||||||
MatchLabels match_labels = 4;
|
MatchLabels match_labels = 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -226,11 +197,8 @@ message Resource {
|
||||||
// * A Function should set this field to READY_TRUE in a RunFunctionResponse
|
// * A Function should set this field to READY_TRUE in a RunFunctionResponse
|
||||||
// to indicate that a desired composed resource is ready.
|
// to indicate that a desired composed resource is ready.
|
||||||
//
|
//
|
||||||
// * A Function should set this field to READY_TRUE in a RunFunctionResponse
|
// * A Function should not set this field in a RunFunctionResponse to indicate
|
||||||
// to indicate that a desired composite resource is ready.
|
// that the desired composite resource is ready. This will be ignored.
|
||||||
// This overwrites the standard readiness detection that determines the
|
|
||||||
// ready state of the composite by the ready state of the the
|
|
||||||
// composed resources.
|
|
||||||
Ready ready = 3;
|
Ready ready = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,13 +220,6 @@ message Result {
|
||||||
|
|
||||||
// Human-readable details about the result.
|
// Human-readable details about the result.
|
||||||
string message = 2;
|
string message = 2;
|
||||||
|
|
||||||
// Optional PascalCase, machine-readable reason for this result. If omitted,
|
|
||||||
// the value will be ComposeResources.
|
|
||||||
optional string reason = 3;
|
|
||||||
|
|
||||||
// The resources this result targets.
|
|
||||||
optional Target target = 4;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Severity of Function results.
|
// Severity of Function results.
|
||||||
|
@ -278,54 +239,4 @@ enum Severity {
|
||||||
// Normal results are emitted as normal events and debug logs associated
|
// Normal results are emitted as normal events and debug logs associated
|
||||||
// with the composite resource.
|
// with the composite resource.
|
||||||
SEVERITY_NORMAL = 3;
|
SEVERITY_NORMAL = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Target of Function results and conditions.
|
|
||||||
enum Target {
|
|
||||||
// If the target is unspecified, the result targets the composite resource.
|
|
||||||
TARGET_UNSPECIFIED = 0;
|
|
||||||
|
|
||||||
// Target the composite resource. Results that target the composite resource
|
|
||||||
// should include detailed, advanced information.
|
|
||||||
TARGET_COMPOSITE = 1;
|
|
||||||
|
|
||||||
// Target the composite and the claim. Results that target the composite and
|
|
||||||
// the claim should include only end-user friendly information.
|
|
||||||
TARGET_COMPOSITE_AND_CLAIM = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Status condition to be applied to the composite resource. Condition may also
|
|
||||||
// optionally be applied to the composite resource's associated claim. For
|
|
||||||
// detailed information on proper usage of status conditions, please see
|
|
||||||
// https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties.
|
|
||||||
message Condition {
|
|
||||||
// Type of condition in PascalCase.
|
|
||||||
string type = 1;
|
|
||||||
|
|
||||||
// Status of the condition.
|
|
||||||
Status status = 2;
|
|
||||||
|
|
||||||
// Reason contains a programmatic identifier indicating the reason for the
|
|
||||||
// condition's last transition. Producers of specific condition types may
|
|
||||||
// define expected values and meanings for this field, and whether the values
|
|
||||||
// are considered a guaranteed API. The value should be a PascalCase string.
|
|
||||||
// This field may not be empty.
|
|
||||||
string reason = 3;
|
|
||||||
|
|
||||||
// Message is a human readable message indicating details about the
|
|
||||||
// transition. This may be an empty string.
|
|
||||||
optional string message = 4;
|
|
||||||
|
|
||||||
// The resources this condition targets.
|
|
||||||
optional Target target = 5;
|
|
||||||
}
|
|
||||||
|
|
||||||
enum Status {
|
|
||||||
STATUS_CONDITION_UNSPECIFIED = 0;
|
|
||||||
|
|
||||||
STATUS_CONDITION_UNKNOWN = 1;
|
|
||||||
|
|
||||||
STATUS_CONDITION_TRUE = 2;
|
|
||||||
|
|
||||||
STATUS_CONDITION_FALSE = 3;
|
|
||||||
}
|
|
|
@ -1,188 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
|
|
||||||
<groupId>io.crossplane.providers</groupId>
|
|
||||||
<artifactId>crossplane-providers-parent</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
<packaging>pom</packaging>
|
|
||||||
|
|
||||||
<url>https://crossplane.io/</url>
|
|
||||||
<description>Crossplane parent pom for provider models</description>
|
|
||||||
|
|
||||||
<properties>
|
|
||||||
<revision>1.0.0-SNAPSHOT</revision>
|
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
|
||||||
<maven.compiler.target>17</maven.compiler.target>
|
|
||||||
<maven.compiler.source>17</maven.compiler.source>
|
|
||||||
<!-- Dependency versions -->
|
|
||||||
<spring-boot.version>3.3.3</spring-boot.version>
|
|
||||||
<kubernetes-client.version>6.13.3</kubernetes-client.version>
|
|
||||||
<jackson-databind.version>2.17.1</jackson-databind.version>
|
|
||||||
|
|
||||||
<!-- Plugin versions -->
|
|
||||||
<flatten-maven-plugin.version>1.6.0</flatten-maven-plugin.version>
|
|
||||||
<central-publishing-maven-plugin.version>0.4.0</central-publishing-maven-plugin.version>
|
|
||||||
<maven-source-plugin.version>3.3.1</maven-source-plugin.version>
|
|
||||||
<maven-javadoc-plugin.version>3.7.0</maven-javadoc-plugin.version>
|
|
||||||
<maven-jar-plugin.version>3.4.2</maven-jar-plugin.version>
|
|
||||||
<maven-gpg-plugin.version>3.2.4</maven-gpg-plugin.version>
|
|
||||||
<build-helper-maven-plugin.version>3.6.0</build-helper-maven-plugin.version>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
|
|
||||||
<dependencyManagement>
|
|
||||||
<dependencies>
|
|
||||||
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.fabric8</groupId>
|
|
||||||
<artifactId>kubernetes-client-bom</artifactId>
|
|
||||||
<version>${kubernetes-client.version}</version>
|
|
||||||
<scope>import</scope>
|
|
||||||
<type>pom</type>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
|
||||||
<artifactId>jackson-databind</artifactId>
|
|
||||||
<version>${jackson-databind.version}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
</dependencies>
|
|
||||||
</dependencyManagement>
|
|
||||||
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<!-- To make the artifacts with ${revision} usable by maven, they have to be flattened -->
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>flatten-maven-plugin</artifactId>
|
|
||||||
<version>${flatten-maven-plugin.version}</version>
|
|
||||||
<configuration>
|
|
||||||
<updatePomFile>true</updatePomFile>
|
|
||||||
<flattenMode>resolveCiFriendliesOnly</flattenMode>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>flatten</id>
|
|
||||||
<phase>process-resources</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>flatten</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>flatten.clean</id>
|
|
||||||
<phase>clean</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>clean</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.sonatype.central</groupId>
|
|
||||||
<artifactId>central-publishing-maven-plugin</artifactId>
|
|
||||||
<version>${central-publishing-maven-plugin.version}</version>
|
|
||||||
<extensions>true</extensions>
|
|
||||||
<configuration>
|
|
||||||
<publishingServerId>central</publishingServerId>
|
|
||||||
<tokenAuth>true</tokenAuth>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-source-plugin</artifactId>
|
|
||||||
<version>${maven-source-plugin.version}</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>attach-sources</id>
|
|
||||||
<goals>
|
|
||||||
<goal>jar-no-fork</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
|
||||||
<version>${maven-jar-plugin.version}</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
|
||||||
<version>${maven-javadoc-plugin.version}</version>
|
|
||||||
<configuration>
|
|
||||||
<doclint>all,missing</doclint>
|
|
||||||
<excludePackageNames>io.upbound.*,io.crossplane.*</excludePackageNames>
|
|
||||||
</configuration>
|
|
||||||
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>attach-javadocs</id>
|
|
||||||
<goals>
|
|
||||||
<goal>jar</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
<licenses>
|
|
||||||
<license>
|
|
||||||
<name>The Apache License, Version 2.0</name>
|
|
||||||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
|
||||||
</license>
|
|
||||||
</licenses>
|
|
||||||
|
|
||||||
|
|
||||||
<developers>
|
|
||||||
<developer>
|
|
||||||
<name>Knut-Erik Johnsen</name>
|
|
||||||
<organization>Crossplane</organization>
|
|
||||||
<organizationUrl>https://crossplane.io</organizationUrl>
|
|
||||||
</developer>
|
|
||||||
</developers>
|
|
||||||
|
|
||||||
<scm>
|
|
||||||
<connection>scm:git:git://github.com/crossplane/function-sdk-java.git</connection>
|
|
||||||
<developerConnection>scm:git:ssh://github.com:crossplane/function-sdk-java.git</developerConnection>
|
|
||||||
<url>https://github.com/crossplane/function-sdk-java/tree/main</url>
|
|
||||||
</scm>
|
|
||||||
|
|
||||||
<profiles>
|
|
||||||
<profile>
|
|
||||||
<id>deploy</id>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-gpg-plugin</artifactId>
|
|
||||||
<version>${maven-gpg-plugin.version}</version>
|
|
||||||
<configuration>
|
|
||||||
<gpgArguments>
|
|
||||||
<arg>--pinentry-mode</arg>
|
|
||||||
<arg>loopback</arg>
|
|
||||||
</gpgArguments>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>sign-artifacts</id>
|
|
||||||
<phase>verify</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>sign</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
|
||||||
</project>
|
|
3
pom.xml
3
pom.xml
|
@ -28,7 +28,7 @@
|
||||||
<spring-boot.version>3.3.3</spring-boot.version>
|
<spring-boot.version>3.3.3</spring-boot.version>
|
||||||
<kubernetes-client.version>6.13.3</kubernetes-client.version>
|
<kubernetes-client.version>6.13.3</kubernetes-client.version>
|
||||||
<os-maven-plugin.version>1.7.1</os-maven-plugin.version>
|
<os-maven-plugin.version>1.7.1</os-maven-plugin.version>
|
||||||
<protobuf.version>3.25.5</protobuf.version>
|
<protobuf.version>3.25.1</protobuf.version>
|
||||||
<grpc.version>1.63.0</grpc.version>
|
<grpc.version>1.63.0</grpc.version>
|
||||||
<jakarta-annotation.version>1.3.5</jakarta-annotation.version>
|
<jakarta-annotation.version>1.3.5</jakarta-annotation.version>
|
||||||
<slf4j.version>2.0.13</slf4j.version>
|
<slf4j.version>2.0.13</slf4j.version>
|
||||||
|
@ -50,7 +50,6 @@
|
||||||
<module>crossplane-protobuf-model</module>
|
<module>crossplane-protobuf-model</module>
|
||||||
<module>crossplane-function-base</module>
|
<module>crossplane-function-base</module>
|
||||||
<module>crossplane-function-springboot-starter</module>
|
<module>crossplane-function-springboot-starter</module>
|
||||||
<module>crossplane-providers-parent</module>
|
|
||||||
<module>crossplane-function-example</module>
|
<module>crossplane-function-example</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
|
|
|
@ -1,54 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<!-- PROJECT -->
|
|
||||||
<parent>
|
|
||||||
<groupId>io.crossplane.providers</groupId>
|
|
||||||
<artifactId>crossplane-providers-parent</artifactId>
|
|
||||||
<version>1.18.0-charlie</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>crossplane-provider-kubernetes-model</artifactId>
|
|
||||||
<description>Crossplane models for the Kubernetes provider</description>
|
|
||||||
|
|
||||||
|
|
||||||
<version>${modelrevision}</version>
|
|
||||||
<properties>
|
|
||||||
<modelrevision>1.0.0-SNAPSHOT</modelrevision>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<!-- DEPENDENCIES -->
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.fabric8</groupId>
|
|
||||||
<artifactId>kubernetes-client</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.fabric8</groupId>
|
|
||||||
<artifactId>generator-annotations</artifactId>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<!-- BUILD -->
|
|
||||||
<build>
|
|
||||||
<!-- PLUGINS -->
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>io.fabric8</groupId>
|
|
||||||
<artifactId>java-generator-maven-plugin</artifactId>
|
|
||||||
<version>${kubernetes-client.version}</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<goals>
|
|
||||||
<goal>generate</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
<configuration>
|
|
||||||
<source>src/main/resources/kubernetes</source>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,7 +0,0 @@
|
||||||
package io.upbound;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This is the project for the Kubernetes Provider.
|
|
||||||
*/
|
|
||||||
public interface KubernetesProvider {
|
|
||||||
}
|
|
|
@ -1,27 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
release="v0.15.0"
|
|
||||||
repo="crossplane-contrib"
|
|
||||||
provider="provider-kubernetes"
|
|
||||||
|
|
||||||
if [ $# -eq 1 ]
|
|
||||||
then
|
|
||||||
release="v$1"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Fetching release: ${release}"
|
|
||||||
|
|
||||||
crds=$(gh api --jq '.[].name' "/repos/${repo}/${provider}/contents/package/crds?ref=${release}")
|
|
||||||
|
|
||||||
|
|
||||||
for crd in $crds;
|
|
||||||
do
|
|
||||||
# output=$(echo $file | cut -d'_' -f2)
|
|
||||||
gh api -H "Accept: application/vnd.github.raw+json" "/repos/${repo}/${provider}/contents/package/crds/${crd}?ref=${release}" > $crd
|
|
||||||
retVal=$?
|
|
||||||
if [ $retVal -ne 0 ]; then
|
|
||||||
echo "Failed to fetch ${crd}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
done
|
|
||||||
|
|
|
@ -1,54 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<!-- PROJECT -->
|
|
||||||
<parent>
|
|
||||||
<groupId>io.crossplane.providers</groupId>
|
|
||||||
<artifactId>crossplane-providers-parent</artifactId>
|
|
||||||
<version>1.18.0-charlie</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>crossplane-provider-terraform-model</artifactId>
|
|
||||||
<description>Crossplane models for the Terraform provider</description>
|
|
||||||
|
|
||||||
|
|
||||||
<version>${modelrevision}</version>
|
|
||||||
<properties>
|
|
||||||
<modelrevision>1.0.0-SNAPSHOT</modelrevision>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<!-- DEPENDENCIES -->
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.fabric8</groupId>
|
|
||||||
<artifactId>kubernetes-client</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.fabric8</groupId>
|
|
||||||
<artifactId>generator-annotations</artifactId>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<!-- BUILD -->
|
|
||||||
<build>
|
|
||||||
<!-- PLUGINS -->
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>io.fabric8</groupId>
|
|
||||||
<artifactId>java-generator-maven-plugin</artifactId>
|
|
||||||
<version>${kubernetes-client.version}</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<goals>
|
|
||||||
<goal>generate</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
<configuration>
|
|
||||||
<source>src/main/resources/kubernetes</source>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,7 +0,0 @@
|
||||||
package io.upbound;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This is the project for the Terraform Provider.
|
|
||||||
*/
|
|
||||||
public interface TerraformProvider {
|
|
||||||
}
|
|
|
@ -1,27 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
release="v0.18.0"
|
|
||||||
repo="upbound"
|
|
||||||
provider="provider-terraform"
|
|
||||||
|
|
||||||
if [ $# -eq 1 ]
|
|
||||||
then
|
|
||||||
release="v$1"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Fetching release: ${release}"
|
|
||||||
|
|
||||||
crds=$(gh api --jq '.[].name' "/repos/${repo}/${provider}/contents/package/crds?ref=${release}")
|
|
||||||
|
|
||||||
|
|
||||||
for crd in $crds;
|
|
||||||
do
|
|
||||||
# output=$(echo $file | cut -d'_' -f2)
|
|
||||||
gh api -H "Accept: application/vnd.github.raw+json" "/repos/${repo}/${provider}/contents/package/crds/${crd}?ref=${release}" > $crd
|
|
||||||
retVal=$?
|
|
||||||
if [ $retVal -ne 0 ]; then
|
|
||||||
echo "Failed to fetch ${crd}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
done
|
|
||||||
|
|
|
@ -1,54 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<!-- PROJECT -->
|
|
||||||
<parent>
|
|
||||||
<groupId>io.crossplane.providers</groupId>
|
|
||||||
<artifactId>crossplane-providers-parent</artifactId>
|
|
||||||
<version>1.18.0-charlie</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>crossplane-provider-upjet-aws-model</artifactId>
|
|
||||||
<description>Crossplane models for the AWS provider</description>
|
|
||||||
|
|
||||||
|
|
||||||
<version>${modelrevision}</version>
|
|
||||||
<properties>
|
|
||||||
<modelrevision>1.0.0-SNAPSHOT</modelrevision>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<!-- DEPENDENCIES -->
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.fabric8</groupId>
|
|
||||||
<artifactId>kubernetes-client</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.fabric8</groupId>
|
|
||||||
<artifactId>generator-annotations</artifactId>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<!-- BUILD -->
|
|
||||||
<build>
|
|
||||||
<!-- PLUGINS -->
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>io.fabric8</groupId>
|
|
||||||
<artifactId>java-generator-maven-plugin</artifactId>
|
|
||||||
<version>${kubernetes-client.version}</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<goals>
|
|
||||||
<goal>generate</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
<configuration>
|
|
||||||
<source>src/main/resources/kubernetes</source>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,7 +0,0 @@
|
||||||
package io.upbound;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This is the project for the AWS Provider.
|
|
||||||
*/
|
|
||||||
public interface AwsProvider {
|
|
||||||
}
|
|
|
@ -1,27 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
release="v1.15.0"
|
|
||||||
repo="crossplane-contrib"
|
|
||||||
provider="provider-upjet-aws"
|
|
||||||
|
|
||||||
if [ $# -eq 1 ]
|
|
||||||
then
|
|
||||||
release="v$1"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Fetching release: ${release}"
|
|
||||||
|
|
||||||
crds=$(gh api --jq '.[].name' "/repos/${repo}/${provider}/contents/package/crds?ref=${release}")
|
|
||||||
|
|
||||||
|
|
||||||
for crd in $crds;
|
|
||||||
do
|
|
||||||
# output=$(echo $file | cut -d'_' -f2)
|
|
||||||
gh api -H "Accept: application/vnd.github.raw+json" "/repos/${repo}/${provider}/contents/package/crds/${crd}?ref=${release}" > $crd
|
|
||||||
retVal=$?
|
|
||||||
if [ $retVal -ne 0 ]; then
|
|
||||||
echo "Failed to fetch ${crd}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
done
|
|
||||||
|
|
|
@ -1,54 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<!-- PROJECT -->
|
|
||||||
<parent>
|
|
||||||
<groupId>io.crossplane.providers</groupId>
|
|
||||||
<artifactId>crossplane-providers-parent</artifactId>
|
|
||||||
<version>1.18.0-charlie</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>crossplane-provider-upjet-azure-model</artifactId>
|
|
||||||
<description>Crossplane models for the Azure upjet based provider</description>
|
|
||||||
|
|
||||||
|
|
||||||
<version>${modelrevision}</version>
|
|
||||||
<properties>
|
|
||||||
<modelrevision>1.0.0-SNAPSHOT</modelrevision>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<!-- DEPENDENCIES -->
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.fabric8</groupId>
|
|
||||||
<artifactId>kubernetes-client</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.fabric8</groupId>
|
|
||||||
<artifactId>generator-annotations</artifactId>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<!-- BUILD -->
|
|
||||||
<build>
|
|
||||||
<!-- PLUGINS -->
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>io.fabric8</groupId>
|
|
||||||
<artifactId>java-generator-maven-plugin</artifactId>
|
|
||||||
<version>${kubernetes-client.version}</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<goals>
|
|
||||||
<goal>generate</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
<configuration>
|
|
||||||
<source>src/main/resources/kubernetes</source>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,7 +0,0 @@
|
||||||
package io.upbound;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This is the project for the upjet based Azure Provider.
|
|
||||||
*/
|
|
||||||
public interface AzureProvider {
|
|
||||||
}
|
|
|
@ -1,25 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
release="v1.0.1"
|
|
||||||
|
|
||||||
if [ $# -eq 1 ]
|
|
||||||
then
|
|
||||||
release="v$1"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Fetching release: ${release}"
|
|
||||||
|
|
||||||
crds=$(gh api --jq '.[].name' "/repos/crossplane-contrib/provider-upjet-azure/contents/package/crds?ref=${release}")
|
|
||||||
|
|
||||||
|
|
||||||
for crd in $crds;
|
|
||||||
do
|
|
||||||
# output=$(echo $file | cut -d'_' -f2)
|
|
||||||
gh api -H "Accept: application/vnd.github.raw+json" "/repos/crossplane-contrib/provider-upjet-azure/contents/package/crds/${crd}?ref=${release}" > $crd
|
|
||||||
retVal=$?
|
|
||||||
if [ $retVal -ne 0 ]; then
|
|
||||||
echo "Failed to fetch ${crd}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
done
|
|
||||||
|
|
|
@ -1,53 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<!-- PROJECT -->
|
|
||||||
<parent>
|
|
||||||
<groupId>io.crossplane.providers</groupId>
|
|
||||||
<artifactId>crossplane-providers-parent</artifactId>
|
|
||||||
<version>1.18.0-charlie</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>crossplane-provider-upjet-azuread-model</artifactId>
|
|
||||||
<description>Crossplane models for the Azure AD upjet based provider</description>
|
|
||||||
|
|
||||||
<version>${modelrevision}</version>
|
|
||||||
<properties>
|
|
||||||
<modelrevision>1.0.0-SNAPSHOT</modelrevision>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<!-- DEPENDENCIES -->
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.fabric8</groupId>
|
|
||||||
<artifactId>kubernetes-client</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.fabric8</groupId>
|
|
||||||
<artifactId>generator-annotations</artifactId>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<!-- BUILD -->
|
|
||||||
<build>
|
|
||||||
<!-- PLUGINS -->
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>io.fabric8</groupId>
|
|
||||||
<artifactId>java-generator-maven-plugin</artifactId>
|
|
||||||
<version>${kubernetes-client.version}</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<goals>
|
|
||||||
<goal>generate</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
<configuration>
|
|
||||||
<source>src/main/resources/kubernetes</source>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,7 +0,0 @@
|
||||||
package io.upbound;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This is the project for the upjet based Azure AD Provider.
|
|
||||||
*/
|
|
||||||
public interface AzureADProvider {
|
|
||||||
}
|
|
|
@ -1,24 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
release="v1.5.0"
|
|
||||||
|
|
||||||
if [ $# -eq 1 ]
|
|
||||||
then
|
|
||||||
release="v$1"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Fetching release: ${release}"
|
|
||||||
|
|
||||||
crds=$(gh api --jq '.[].name' "/repos/crossplane-contrib/provider-upjet-azuread/contents/package/crds?ref=${release}")
|
|
||||||
|
|
||||||
|
|
||||||
for crd in $crds;
|
|
||||||
do
|
|
||||||
# output=$(echo $file | cut -d'_' -f2)
|
|
||||||
gh api -H "Accept: application/vnd.github.raw+json" "/repos/crossplane-contrib/provider-upjet-azuread/contents/package/crds/${crd}?ref=${release}" > $crd
|
|
||||||
retVal=$?
|
|
||||||
if [ $retVal -ne 0 ]; then
|
|
||||||
echo "Failed to fetch ${crd}"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
|
@ -1,54 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<!-- PROJECT -->
|
|
||||||
<parent>
|
|
||||||
<groupId>io.crossplane.providers</groupId>
|
|
||||||
<artifactId>crossplane-providers-parent</artifactId>
|
|
||||||
<version>1.18.0-charlie</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>crossplane-provider-upjet-gcp-model</artifactId>
|
|
||||||
<description>Crossplane models for the GCP provider</description>
|
|
||||||
|
|
||||||
|
|
||||||
<version>${modelrevision}</version>
|
|
||||||
<properties>
|
|
||||||
<modelrevision>1.0.0-SNAPSHOT</modelrevision>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<!-- DEPENDENCIES -->
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.fabric8</groupId>
|
|
||||||
<artifactId>kubernetes-client</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.fabric8</groupId>
|
|
||||||
<artifactId>generator-annotations</artifactId>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<!-- BUILD -->
|
|
||||||
<build>
|
|
||||||
<!-- PLUGINS -->
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>io.fabric8</groupId>
|
|
||||||
<artifactId>java-generator-maven-plugin</artifactId>
|
|
||||||
<version>${kubernetes-client.version}</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<goals>
|
|
||||||
<goal>generate</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
<configuration>
|
|
||||||
<source>src/main/resources/kubernetes</source>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,7 +0,0 @@
|
||||||
package io.upbound;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This is the project for the GCP Provider.
|
|
||||||
*/
|
|
||||||
public interface GcpProvider {
|
|
||||||
}
|
|
|
@ -1,27 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
release="v1.8.3"
|
|
||||||
repo="crossplane-contrib"
|
|
||||||
provider="provider-upjet-gcp"
|
|
||||||
|
|
||||||
if [ $# -eq 1 ]
|
|
||||||
then
|
|
||||||
release="v$1"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Fetching release: ${release}"
|
|
||||||
|
|
||||||
crds=$(gh api --jq '.[].name' "/repos/${repo}/${provider}/contents/package/crds?ref=${release}")
|
|
||||||
|
|
||||||
|
|
||||||
for crd in $crds;
|
|
||||||
do
|
|
||||||
# output=$(echo $file | cut -d'_' -f2)
|
|
||||||
gh api -H "Accept: application/vnd.github.raw+json" "/repos/${repo}/${provider}/contents/package/crds/${crd}?ref=${release}" > $crd
|
|
||||||
retVal=$?
|
|
||||||
if [ $retVal -ne 0 ]; then
|
|
||||||
echo "Failed to fetch ${crd}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
done
|
|
||||||
|
|
|
@ -1,54 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<!-- PROJECT -->
|
|
||||||
<parent>
|
|
||||||
<groupId>io.crossplane.providers</groupId>
|
|
||||||
<artifactId>crossplane-providers-parent</artifactId>
|
|
||||||
<version>1.18.0-charlie</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>crossplane-provider-upjet-github-model</artifactId>
|
|
||||||
<description>Crossplane models for the Github provider</description>
|
|
||||||
|
|
||||||
|
|
||||||
<version>${modelrevision}</version>
|
|
||||||
<properties>
|
|
||||||
<modelrevision>1.0.0-SNAPSHOT</modelrevision>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<!-- DEPENDENCIES -->
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.fabric8</groupId>
|
|
||||||
<artifactId>kubernetes-client</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.fabric8</groupId>
|
|
||||||
<artifactId>generator-annotations</artifactId>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<!-- BUILD -->
|
|
||||||
<build>
|
|
||||||
<!-- PLUGINS -->
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>io.fabric8</groupId>
|
|
||||||
<artifactId>java-generator-maven-plugin</artifactId>
|
|
||||||
<version>${kubernetes-client.version}</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<goals>
|
|
||||||
<goal>generate</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
<configuration>
|
|
||||||
<source>src/main/resources/kubernetes</source>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,7 +0,0 @@
|
||||||
package io.upbound;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This is the project for the Github Provider.
|
|
||||||
*/
|
|
||||||
public interface GithubProvider {
|
|
||||||
}
|
|
|
@ -1,27 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
release="v0.14.0"
|
|
||||||
repo="crossplane-contrib"
|
|
||||||
provider="provider-upjet-github"
|
|
||||||
|
|
||||||
if [ $# -eq 1 ]
|
|
||||||
then
|
|
||||||
release="v$1"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Fetching release: ${release}"
|
|
||||||
|
|
||||||
crds=$(gh api --jq '.[].name' "/repos/${repo}/${provider}/contents/package/crds?ref=${release}")
|
|
||||||
|
|
||||||
|
|
||||||
for crd in $crds;
|
|
||||||
do
|
|
||||||
# output=$(echo $file | cut -d'_' -f2)
|
|
||||||
gh api -H "Accept: application/vnd.github.raw+json" "/repos/${repo}/${provider}/contents/package/crds/${crd}?ref=${release}" > $crd
|
|
||||||
retVal=$?
|
|
||||||
if [ $retVal -ne 0 ]; then
|
|
||||||
echo "Failed to fetch ${crd}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
done
|
|
||||||
|
|
Loading…
Reference in New Issue