Skip to content

Commit 81d0fa1

Browse files
committed
Started on adding support for 1.17 spec. Start on provider-models to ease java development
Signed-off-by: Knut-Erik Johnsen <[email protected]>
1 parent 57d4f1c commit 81d0fa1

File tree

23 files changed

+462
-68
lines changed

23 files changed

+462
-68
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Release a new version
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
releaseversion:
7+
type: string
8+
description: 'Version to release'
9+
required: true
10+
provider:
11+
type: string
12+
description: 'Version to release'
13+
required: true
14+
options:
15+
- provider-upjet-azure
16+
- provider-upjet-azuread
17+
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Set up JDK 17
25+
uses: actions/setup-java@v4
26+
with:
27+
java-version: '17'
28+
distribution: 'oracle'
29+
cache: maven
30+
server-id: central
31+
server-username: MAVEN_CENTRAL_USERNAME # env variable for username in deploy
32+
server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy
33+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
34+
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
35+
- name: Fetch crds
36+
working-directory: "./provider-models/crossplane-${{ github.event.inputs.provider }}/src/main/resources/kubernetes"
37+
run : ./fecth.sh
38+
- name: List crds
39+
working-directory: "./provider-models/crossplane-${{ github.event.inputs.provider }}/src/main/resources/kubernetes"
40+
run : ls
41+
#- name: Set the revision property
42+
# run: mvn versions:set-property -Dproperty=revision "-DnewVersion=${{ github.event.inputs.releaseversion }}" -DgenerateBackupPoms=false
43+
#- name: Build with Maven
44+
# run: mvn -B deploy --file pom.xml -Pdeploy
45+
# env:
46+
# MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
47+
# MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
48+
# MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
49+
# MAVEN_OPTS: "-Xmx2048m"
50+
#- name: Create release
51+
# env:
52+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
# tag: "${{ github.event.inputs.releaseversion }}"
54+
# run: |
55+
# gh release create "$tag" \
56+
# --repo="$GITHUB_REPOSITORY" \
57+
# --title="v${tag#v}" \
58+
# --generate-notes \
59+
# --target "$GITHUB_SHA"

.github/workflows/maven-release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
inputs:
66
releaseversion:
77
type: string
8-
description: 'Version to reelase'
8+
description: 'Version to release'
99
required: true
1010

1111

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,5 @@ replay_pid*
2828
.idea/
2929
target/
3030
generated/
31+
32+
provider-models/**/src/main/resources/kubernetes/*.yaml

crossplane-crd-model/src/main/resources/kubernetes/apiextensions.crossplane.io_compositeresourcedefinitions.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
apiVersion: apiextensions.k8s.io/v1
23
kind: CustomResourceDefinition
34
metadata:
@@ -79,6 +80,7 @@ spec:
7980
items:
8081
type: string
8182
type: array
83+
x-kubernetes-list-type: atomic
8284
kind:
8385
description: |-
8486
kind is the serialized kind of the resource. It is normally CamelCase and singular.
@@ -103,6 +105,7 @@ spec:
103105
items:
104106
type: string
105107
type: array
108+
x-kubernetes-list-type: atomic
106109
singular:
107110
description: singular is the singular name of the resource. It
108111
must be all lowercase. Defaults to lowercased `kind`.
@@ -111,6 +114,9 @@ spec:
111114
- kind
112115
- plural
113116
type: object
117+
x-kubernetes-validations:
118+
- message: Value is immutable
119+
rule: self == oldSelf
114120
connectionSecretKeys:
115121
description: |-
116122
ConnectionSecretKeys is the list of keys that will be exposed to the end
@@ -222,6 +228,7 @@ spec:
222228
items:
223229
type: string
224230
type: array
231+
x-kubernetes-list-type: atomic
225232
required:
226233
- conversionReviewVersions
227234
type: object
@@ -268,12 +275,18 @@ spec:
268275
required:
269276
- name
270277
type: object
278+
x-kubernetes-validations:
279+
- message: Value is immutable
280+
rule: self == oldSelf
271281
group:
272282
description: |-
273283
Group specifies the API group of the defined composite resource.
274284
Composite resources are served under `/apis/<group>/...`. Must match the
275285
name of the XRD (in the form `<names.plural>.<group>`).
276286
type: string
287+
x-kubernetes-validations:
288+
- message: Value is immutable
289+
rule: self == oldSelf
277290
metadata:
278291
description: Metadata specifies the desired metadata for the defined
279292
composite resource and claim CRD's.
@@ -312,6 +325,7 @@ spec:
312325
items:
313326
type: string
314327
type: array
328+
x-kubernetes-list-type: atomic
315329
kind:
316330
description: |-
317331
kind is the serialized kind of the resource. It is normally CamelCase and singular.
@@ -336,6 +350,7 @@ spec:
336350
items:
337351
type: string
338352
type: array
353+
x-kubernetes-list-type: atomic
339354
singular:
340355
description: singular is the singular name of the resource. It
341356
must be all lowercase. Defaults to lowercased `kind`.
@@ -344,6 +359,9 @@ spec:
344359
- kind
345360
- plural
346361
type: object
362+
x-kubernetes-validations:
363+
- message: Value is immutable
364+
rule: self == oldSelf
347365
versions:
348366
description: |-
349367
Versions is the list of all API versions of the defined composite

crossplane-crd-model/src/main/resources/kubernetes/apiextensions.crossplane.io_compositionrevisions.yaml

Lines changed: 65 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
apiVersion: apiextensions.k8s.io/v1
23
kind: CustomResourceDefinition
34
metadata:
@@ -78,6 +79,9 @@ spec:
7879
- apiVersion
7980
- kind
8081
type: object
82+
x-kubernetes-validations:
83+
- message: Value is immutable
84+
rule: self == oldSelf
8185
environment:
8286
description: |-
8387
Environment configures the environment in which resources are rendered.
@@ -584,17 +588,20 @@ spec:
584588
Mode controls what type or "mode" of Composition will be used.
585589
586590
587-
"Resources" (the default) indicates that a Composition uses what is
588-
commonly referred to as "Patch & Transform" or P&T composition. This mode
589-
of Composition uses an array of resources, each a template for a composed
590-
resource.
591+
"Pipeline" indicates that a Composition specifies a pipeline of
592+
Composition Functions, each of which is responsible for producing
593+
composed resources that Crossplane should create or update.
591594
592595
593-
"Pipeline" indicates that a Composition specifies a pipeline
594-
of Composition Functions, each of which is responsible for producing
595-
composed resources that Crossplane should create or update. THE PIPELINE
596-
MODE IS A BETA FEATURE. It is not honored if the relevant Crossplane
597-
feature flag is disabled.
596+
"Resources" indicates that a Composition uses what is commonly referred
597+
to as "Patch & Transform" or P&T composition. This mode of Composition
598+
uses an array of resources, each a template for a composed resource.
599+
600+
601+
All Compositions should use Pipeline mode. Resources mode is deprecated.
602+
Resources mode won't be removed in Crossplane 1.x, and will remain the
603+
default to avoid breaking legacy Compositions. However, it's no longer
604+
accepting new features, and only accepting security related bug fixes.
598605
enum:
599606
- Resources
600607
- Pipeline
@@ -608,6 +615,9 @@ spec:
608615
609616
PatchSets are only used by the "Resources" mode of Composition. They
610617
are ignored by other modes.
618+
619+
620+
Deprecated: Use Composition Functions instead.
611621
items:
612622
description: |-
613623
A PatchSet is a set of patches that can be reused from all resources within
@@ -984,10 +994,6 @@ spec:
984994
985995
The Pipeline is only used by the "Pipeline" mode of Composition. It is
986996
ignored by other modes.
987-
988-
989-
THIS IS A BETA FIELD. It is not honored if the relevant Crossplane
990-
feature flag is disabled.
991997
items:
992998
description: A PipelineStep in a Composition Function pipeline.
993999
properties:
@@ -1058,6 +1064,9 @@ spec:
10581064
- step
10591065
type: object
10601066
type: array
1067+
x-kubernetes-list-map-keys:
1068+
- step
1069+
x-kubernetes-list-type: map
10611070
publishConnectionDetailsWithStoreConfigRef:
10621071
default:
10631072
name: default
@@ -1085,6 +1094,9 @@ spec:
10851094
10861095
Resources are only used by the "Resources" mode of Composition. They are
10871096
ignored by other modes.
1097+
1098+
1099+
Deprecated: Use Composition Functions instead.
10881100
items:
10891101
description: |-
10901102
ComposedTemplate is used to provide information about how the composed resource
@@ -1575,7 +1587,14 @@ spec:
15751587
type: object
15761588
type: array
15771589
revision:
1578-
description: Revision number. Newer revisions have larger numbers.
1590+
description: |-
1591+
Revision number. Newer revisions have larger numbers.
1592+
1593+
1594+
This number can change. When a Composition transitions from state A
1595+
-> B -> A there will be only two CompositionRevisions. Crossplane will
1596+
edit the original CompositionRevision to change its revision number from
1597+
0 to 2.
15791598
format: int64
15801599
type: integer
15811600
writeConnectionSecretsToNamespace:
@@ -1711,6 +1730,9 @@ spec:
17111730
- apiVersion
17121731
- kind
17131732
type: object
1733+
x-kubernetes-validations:
1734+
- message: Value is immutable
1735+
rule: self == oldSelf
17141736
environment:
17151737
description: |-
17161738
Environment configures the environment in which resources are rendered.
@@ -2217,17 +2239,20 @@ spec:
22172239
Mode controls what type or "mode" of Composition will be used.
22182240
22192241
2220-
"Resources" (the default) indicates that a Composition uses what is
2221-
commonly referred to as "Patch & Transform" or P&T composition. This mode
2222-
of Composition uses an array of resources, each a template for a composed
2223-
resource.
2242+
"Pipeline" indicates that a Composition specifies a pipeline of
2243+
Composition Functions, each of which is responsible for producing
2244+
composed resources that Crossplane should create or update.
22242245
22252246
2226-
"Pipeline" indicates that a Composition specifies a pipeline
2227-
of Composition Functions, each of which is responsible for producing
2228-
composed resources that Crossplane should create or update. THE PIPELINE
2229-
MODE IS A BETA FEATURE. It is not honored if the relevant Crossplane
2230-
feature flag is disabled.
2247+
"Resources" indicates that a Composition uses what is commonly referred
2248+
to as "Patch & Transform" or P&T composition. This mode of Composition
2249+
uses an array of resources, each a template for a composed resource.
2250+
2251+
2252+
All Compositions should use Pipeline mode. Resources mode is deprecated.
2253+
Resources mode won't be removed in Crossplane 1.x, and will remain the
2254+
default to avoid breaking legacy Compositions. However, it's no longer
2255+
accepting new features, and only accepting security related bug fixes.
22312256
enum:
22322257
- Resources
22332258
- Pipeline
@@ -2241,6 +2266,9 @@ spec:
22412266
22422267
PatchSets are only used by the "Resources" mode of Composition. They
22432268
are ignored by other modes.
2269+
2270+
2271+
Deprecated: Use Composition Functions instead.
22442272
items:
22452273
description: |-
22462274
A PatchSet is a set of patches that can be reused from all resources within
@@ -2617,10 +2645,6 @@ spec:
26172645
26182646
The Pipeline is only used by the "Pipeline" mode of Composition. It is
26192647
ignored by other modes.
2620-
2621-
2622-
THIS IS A BETA FIELD. It is not honored if the relevant Crossplane
2623-
feature flag is disabled.
26242648
items:
26252649
description: A PipelineStep in a Composition Function pipeline.
26262650
properties:
@@ -2691,6 +2715,9 @@ spec:
26912715
- step
26922716
type: object
26932717
type: array
2718+
x-kubernetes-list-map-keys:
2719+
- step
2720+
x-kubernetes-list-type: map
26942721
publishConnectionDetailsWithStoreConfigRef:
26952722
default:
26962723
name: default
@@ -2718,6 +2745,9 @@ spec:
27182745
27192746
Resources are only used by the "Resources" mode of Composition. They are
27202747
ignored by other modes.
2748+
2749+
2750+
Deprecated: Use Composition Functions instead.
27212751
items:
27222752
description: |-
27232753
ComposedTemplate is used to provide information about how the composed resource
@@ -3208,7 +3238,14 @@ spec:
32083238
type: object
32093239
type: array
32103240
revision:
3211-
description: Revision number. Newer revisions have larger numbers.
3241+
description: |-
3242+
Revision number. Newer revisions have larger numbers.
3243+
3244+
3245+
This number can change. When a Composition transitions from state A
3246+
-> B -> A there will be only two CompositionRevisions. Crossplane will
3247+
edit the original CompositionRevision to change its revision number from
3248+
0 to 2.
32123249
format: int64
32133250
type: integer
32143251
writeConnectionSecretsToNamespace:

0 commit comments

Comments
 (0)