Skip to content

Commit 3d73f65

Browse files
fix: align ansible-run config with project conventions (#50)
* fix: align ansible-run configuration with project conventions Move composition to compositions/ dir, add targetCluster and status to XRD, rename examples to use XR naming, fix crossplane version, normalize function apiVersions, and add provider-config.yaml. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: use full function names in ansible-run composition Match the installed Function resource names on the cluster (crossplane-contrib-function-kcl, crossplane-contrib-function-auto-ready). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f9bbe75 commit 3d73f65

8 files changed

Lines changed: 42 additions & 6 deletions

File tree

configurations/apps/ansible-run/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
## DEV
44

55
```bash
6-
crossplane render examples/claim.yaml \
7-
apis/composition.yaml \
6+
crossplane render examples/ansible-run.yaml \
7+
compositions/ansible-run.yaml \
88
examples/functions.yaml \
99
--include-function-results
1010
```

configurations/apps/ansible-run/apis/definition.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,32 @@ spec:
155155
description: Timeout for Crossplane operations
156156
default: "60"
157157

158+
# Target Cluster
159+
targetCluster:
160+
type: object
161+
description: Target cluster configuration
162+
properties:
163+
name:
164+
type: string
165+
description: Name of the ProviderConfig
166+
default: in-cluster
167+
scope:
168+
type: string
169+
description: Scope of the ProviderConfig (Namespaced or Cluster)
170+
default: Namespaced
171+
enum:
172+
- Namespaced
173+
- Cluster
174+
158175
required:
159176
- pipelineRunName
160177
- namespace
161178
- gitRepoUrl
162179
- ansiblePlaybooks
180+
181+
status:
182+
type: object
183+
properties:
184+
installed:
185+
type: boolean
186+
description: Whether the AnsibleRun has been installed

configurations/apps/ansible-run/apis/composition.yaml renamed to configurations/apps/ansible-run/compositions/ansible-run.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ spec:
1313
pipeline:
1414
- step: create-ansiblerun
1515
functionRef:
16-
name: function-kcl
16+
name: crossplane-contrib-function-kcl
1717
input:
1818
apiVersion: krm.kcl.dev/v1alpha1
1919
kind: KCLInput
@@ -23,4 +23,4 @@ spec:
2323
source: oci://ghcr.io/stuttgart-things/kcl-tekton-pr:0.4.6
2424
- step: automatically-detect-ready-composed-resources
2525
functionRef:
26-
name: function-auto-ready
26+
name: crossplane-contrib-function-auto-ready

configurations/apps/ansible-run/crossplane.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ metadata:
1313
deploys AnsibleRun w/ crossplane
1414
spec:
1515
crossplane:
16-
version: ">=v2.1.3"
16+
version: ">=2.13.0"
1717
dependsOn:
1818
- provider: xpkg.upbound.io/crossplane-contrib/provider-kubernetes
1919
version: ">=v1.2.0"

configurations/apps/ansible-run/examples/claim-minimal.yaml renamed to configurations/apps/ansible-run/examples/ansible-run-minimal.yaml

File renamed without changes.

configurations/apps/ansible-run/examples/claim.yaml renamed to configurations/apps/ansible-run/examples/ansible-run.yaml

File renamed without changes.

configurations/apps/ansible-run/examples/functions.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
apiVersion: pkg.crossplane.io/v1
2+
apiVersion: pkg.crossplane.io/v1beta1
33
kind: Function
44
metadata:
55
name: function-kcl
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
apiVersion: kubernetes.crossplane.io/v1alpha1
3+
kind: ProviderConfig
4+
metadata:
5+
name: kubernetes-provider
6+
spec:
7+
credentials:
8+
source: Secret
9+
secretRef:
10+
namespace: crossplane-system
11+
name: kubernetes-provider
12+
key: kubeconfig

0 commit comments

Comments
 (0)