Skip to content

Commit

Permalink
Started on adding support for 1.17 spec. Start on provider-models to …
Browse files Browse the repository at this point in the history
…ease java development

Signed-off-by: Knut-Erik Johnsen <[email protected]>
  • Loading branch information
knutejoh committed Oct 11, 2024
1 parent 57d4f1c commit 81d0fa1
Show file tree
Hide file tree
Showing 23 changed files with 462 additions and 68 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/maven-release-provider-model.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Release a new version

on:
workflow_dispatch:
inputs:
releaseversion:
type: string
description: 'Version to release'
required: true
provider:
type: string
description: 'Version to release'
required: true
options:
- provider-upjet-azure
- provider-upjet-azuread


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
working-directory: "./provider-models/crossplane-${{ github.event.inputs.provider }}/src/main/resources/kubernetes"
run : ./fecth.sh
- name: List crds
working-directory: "./provider-models/crossplane-${{ github.event.inputs.provider }}/src/main/resources/kubernetes"
run : ls
#- name: Set the revision property
# run: mvn versions:set-property -Dproperty=revision "-DnewVersion=${{ github.event.inputs.releaseversion }}" -DgenerateBackupPoms=false
#- name: Build with Maven
# 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 }}"
# run: |
# gh release create "$tag" \
# --repo="$GITHUB_REPOSITORY" \
# --title="v${tag#v}" \
# --generate-notes \
# --target "$GITHUB_SHA"
2 changes: 1 addition & 1 deletion .github/workflows/maven-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
inputs:
releaseversion:
type: string
description: 'Version to reelase'
description: 'Version to release'
required: true


Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ replay_pid*
.idea/
target/
generated/

provider-models/**/src/main/resources/kubernetes/*.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down Expand Up @@ -79,6 +80,7 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
kind:
description: |-
kind is the serialized kind of the resource. It is normally CamelCase and singular.
Expand All @@ -103,6 +105,7 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
singular:
description: singular is the singular name of the resource. It
must be all lowercase. Defaults to lowercased `kind`.
Expand All @@ -111,6 +114,9 @@ spec:
- kind
- plural
type: object
x-kubernetes-validations:
- message: Value is immutable
rule: self == oldSelf
connectionSecretKeys:
description: |-
ConnectionSecretKeys is the list of keys that will be exposed to the end
Expand Down Expand Up @@ -222,6 +228,7 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- conversionReviewVersions
type: object
Expand Down Expand Up @@ -268,12 +275,18 @@ spec:
required:
- name
type: object
x-kubernetes-validations:
- message: Value is immutable
rule: self == oldSelf
group:
description: |-
Group specifies the API group of the defined composite resource.
Composite resources are served under `/apis/<group>/...`. Must match the
name of the XRD (in the form `<names.plural>.<group>`).
type: string
x-kubernetes-validations:
- message: Value is immutable
rule: self == oldSelf
metadata:
description: Metadata specifies the desired metadata for the defined
composite resource and claim CRD's.
Expand Down Expand Up @@ -312,6 +325,7 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
kind:
description: |-
kind is the serialized kind of the resource. It is normally CamelCase and singular.
Expand All @@ -336,6 +350,7 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
singular:
description: singular is the singular name of the resource. It
must be all lowercase. Defaults to lowercased `kind`.
Expand All @@ -344,6 +359,9 @@ spec:
- kind
- plural
type: object
x-kubernetes-validations:
- message: Value is immutable
rule: self == oldSelf
versions:
description: |-
Versions is the list of all API versions of the defined composite
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down Expand Up @@ -78,6 +79,9 @@ spec:
- apiVersion
- kind
type: object
x-kubernetes-validations:
- message: Value is immutable
rule: self == oldSelf
environment:
description: |-
Environment configures the environment in which resources are rendered.
Expand Down Expand Up @@ -584,17 +588,20 @@ spec:
Mode controls what type or "mode" of Composition will be used.
"Resources" (the default) indicates that a Composition uses what is
commonly referred to as "Patch & Transform" or P&T composition. This mode
of Composition uses an array of resources, each a template for a composed
resource.
"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.
"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. THE PIPELINE
MODE IS A BETA FEATURE. It is not honored if the relevant Crossplane
feature flag is disabled.
"Resources" indicates that a Composition uses what is commonly referred
to as "Patch & Transform" or P&T composition. This mode 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
default to avoid breaking legacy Compositions. However, it's no longer
accepting new features, and only accepting security related bug fixes.
enum:
- Resources
- Pipeline
Expand All @@ -608,6 +615,9 @@ spec:
PatchSets are only used by the "Resources" mode of Composition. They
are ignored by other modes.
Deprecated: Use Composition Functions instead.
items:
description: |-
A PatchSet is a set of patches that can be reused from all resources within
Expand Down Expand Up @@ -984,10 +994,6 @@ spec:
The Pipeline is only used by the "Pipeline" mode of Composition. It is
ignored by other modes.
THIS IS A BETA FIELD. It is not honored if the relevant Crossplane
feature flag is disabled.
items:
description: A PipelineStep in a Composition Function pipeline.
properties:
Expand Down Expand Up @@ -1058,6 +1064,9 @@ spec:
- step
type: object
type: array
x-kubernetes-list-map-keys:
- step
x-kubernetes-list-type: map
publishConnectionDetailsWithStoreConfigRef:
default:
name: default
Expand Down Expand Up @@ -1085,6 +1094,9 @@ spec:
Resources are only used by the "Resources" mode of Composition. They are
ignored by other modes.
Deprecated: Use Composition Functions instead.
items:
description: |-
ComposedTemplate is used to provide information about how the composed resource
Expand Down Expand Up @@ -1575,7 +1587,14 @@ spec:
type: object
type: array
revision:
description: Revision number. Newer revisions have larger numbers.
description: |-
Revision number. Newer revisions have larger numbers.
This number can change. When a Composition transitions from state A
-> B -> A there will be only two CompositionRevisions. Crossplane will
edit the original CompositionRevision to change its revision number from
0 to 2.
format: int64
type: integer
writeConnectionSecretsToNamespace:
Expand Down Expand Up @@ -1711,6 +1730,9 @@ spec:
- apiVersion
- kind
type: object
x-kubernetes-validations:
- message: Value is immutable
rule: self == oldSelf
environment:
description: |-
Environment configures the environment in which resources are rendered.
Expand Down Expand Up @@ -2217,17 +2239,20 @@ spec:
Mode controls what type or "mode" of Composition will be used.
"Resources" (the default) indicates that a Composition uses what is
commonly referred to as "Patch & Transform" or P&T composition. This mode
of Composition uses an array of resources, each a template for a composed
resource.
"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.
"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. THE PIPELINE
MODE IS A BETA FEATURE. It is not honored if the relevant Crossplane
feature flag is disabled.
"Resources" indicates that a Composition uses what is commonly referred
to as "Patch & Transform" or P&T composition. This mode 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
default to avoid breaking legacy Compositions. However, it's no longer
accepting new features, and only accepting security related bug fixes.
enum:
- Resources
- Pipeline
Expand All @@ -2241,6 +2266,9 @@ spec:
PatchSets are only used by the "Resources" mode of Composition. They
are ignored by other modes.
Deprecated: Use Composition Functions instead.
items:
description: |-
A PatchSet is a set of patches that can be reused from all resources within
Expand Down Expand Up @@ -2617,10 +2645,6 @@ spec:
The Pipeline is only used by the "Pipeline" mode of Composition. It is
ignored by other modes.
THIS IS A BETA FIELD. It is not honored if the relevant Crossplane
feature flag is disabled.
items:
description: A PipelineStep in a Composition Function pipeline.
properties:
Expand Down Expand Up @@ -2691,6 +2715,9 @@ spec:
- step
type: object
type: array
x-kubernetes-list-map-keys:
- step
x-kubernetes-list-type: map
publishConnectionDetailsWithStoreConfigRef:
default:
name: default
Expand Down Expand Up @@ -2718,6 +2745,9 @@ spec:
Resources are only used by the "Resources" mode of Composition. They are
ignored by other modes.
Deprecated: Use Composition Functions instead.
items:
description: |-
ComposedTemplate is used to provide information about how the composed resource
Expand Down Expand Up @@ -3208,7 +3238,14 @@ spec:
type: object
type: array
revision:
description: Revision number. Newer revisions have larger numbers.
description: |-
Revision number. Newer revisions have larger numbers.
This number can change. When a Composition transitions from state A
-> B -> A there will be only two CompositionRevisions. Crossplane will
edit the original CompositionRevision to change its revision number from
0 to 2.
format: int64
type: integer
writeConnectionSecretsToNamespace:
Expand Down
Loading

0 comments on commit 81d0fa1

Please sign in to comment.