Skip to content

Commit 188c6eb

Browse files
committed
feat: labels, package name
1 parent ef3ff35 commit 188c6eb

14 files changed

Lines changed: 40 additions & 272 deletions

File tree

.gitops/deploy/Chart.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: v2
2-
name: configuration-aws-irsa
2+
name: aws-account
33
version: 0.0.0
4-
description: A Helm chart for my application
5-
appVersion: v1.19.0
4+
description: GitOps packaging for the aws-account bundle
5+
appVersion: v0.1.0
Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
apiVersion: pkg.crossplane.io/v1
22
kind: Configuration
33
metadata:
4-
name: configuration-aws-irsa
4+
name: aws-account
55
spec:
6-
package: ghcr.io/hops-ops/configuration-aws-irsa:{{ .Values.version }}
6+
package: ghcr.io/hops-ops/aws-account:{{ .Values.version }}
77
packagePullSecrets:
88
- name: ghcr
99
skipDependencyResolution: {{ .Values.skipDependencyResolution }}
1010

1111
---
1212

13-
# skipDependencyResolution false would have named this hops-ops-configuration-aws-irsarender
14-
# so we need to match that format to avoid issues with the package name
1513
apiVersion: pkg.crossplane.io/v1
1614
kind: Function
1715
metadata:
18-
name: hops-ops-configuration-aws-irsarender
16+
name: hops-ops-aws-accountrender
1917
spec:
20-
package: ghcr.io/hops-ops/configuration-aws-irsa_render:{{ .Values.version }}
18+
package: ghcr.io/hops-ops/aws-account_render:{{ .Values.version }}
2119
packagePullSecrets:
2220
- name: ghcr
2321
skipDependencyResolution: {{ .Values.skipDependencyResolution }}

AGENTS.md

Lines changed: 0 additions & 247 deletions
This file was deleted.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
SHELL := /bin/bash
22

3-
PACKAGE ?= configuration-aws-account
3+
PACKAGE ?= aws-account
44
XRD_DIR := apis/accounts
55
COMPOSITION := $(XRD_DIR)/composition.yaml
66
DEFINITION := $(XRD_DIR)/definition.yaml

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# configuration-aws-account
1+
# aws-account
22

33
Create and manage individual AWS Organizations member accounts. This is a low-level building block - most users should use the Organization XRD with inline accounts instead.
44

apis/accounts/composition.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ spec:
99
mode: Pipeline
1010
pipeline:
1111
- functionRef:
12-
name: hops-ops-configuration-aws-accountrender
12+
name: hops-ops-aws-accountrender
1313
step: render
1414
- functionRef:
1515
name: crossplane-contrib-function-auto-ready

apis/accounts/configuration.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
apiVersion: meta.pkg.crossplane.io/v1alpha1
22
kind: Configuration
33
metadata:
4-
name: configuration-aws-account
4+
name: aws-account
55
annotations:
66
meta.crossplane.io/maintainer: Patrick Lee Scott
7-
meta.crossplane.io/source: github.com/hops-ops/configuration-aws-account
7+
meta.crossplane.io/source: github.com/hops-ops/aws-account
88
meta.crossplane.io/description: Vends AWS Organizations accounts, OU placement, and ProviderConfigs.
99
spec:
1010
dependsOn:

apis/accounts/definition.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ spec:
6666
description: Optional list of Service Control Policy ARNs to attach to the account.
6767
items:
6868
type: string
69+
labels:
70+
type: object
71+
description: Custom labels applied to all managed resources. Merged with default labels (hops.ops.com.ai/managed, hops.ops.com.ai/<kind>).
72+
additionalProperties:
73+
type: string
74+
x-kubernetes-preserve-unknown-fields: true
6975
tags:
7076
type: object
7177
description: "AWS resource tags. Automatically includes {\"hops\": \"true\"}."

functions/render/000-state-init.yaml.gotmpl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
{{- $metadata := $xr.metadata | default dict }}
44
{{- $spec := $xr.spec | default dict }}
55

6+
{{- /* Default labels: managed=true + <kind>=<name> */}}
7+
{{- $defaultLabels := dict
8+
"hops.ops.com.ai/managed" "true"
9+
(printf "hops.ops.com.ai/%s" (lower $xr.kind)) $metadata.name
10+
}}
11+
612
{{- $state := dict
713
"spec" (dict
814
"raw" $spec
@@ -17,6 +23,7 @@
1723
)
1824
"managementPolicies" ($spec.managementPolicies | default (list "*"))
1925
"policyAttachments" ($spec.policyAttachments | default list)
26+
"labels" (merge $defaultLabels ($spec.labels | default dict))
2027
"tags" (merge (dict "hops" "true") ($spec.tags | default dict))
2128
"forProvider" ($spec.forProvider | default dict)
2229
)

functions/render/005-state-account.yaml.gotmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"externalName" $eff.externalName
1212
"providerConfig" $eff.providerConfigRef
1313
"managementPolicies" $eff.managementPolicies
14+
"labels" $eff.labels
1415
"tags" $eff.tags
1516
"forProvider" $eff.forProvider
1617
}}

0 commit comments

Comments
 (0)