Skip to content

Commit 8473c77

Browse files
authored
Merge pull request #3 from sapphirew/add-index-resource
feat: add support for Index resource
2 parents 79ba13d + b89f000 commit 8473c77

36 files changed

Lines changed: 3445 additions & 34 deletions

ATTRIBUTION.md

Lines changed: 252 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1486,7 +1486,259 @@ License Identifier: Apache-2.0
14861486

14871487
License Identifier: Apache-2.0
14881488

1489+
### github.com/aws-controllers-k8s/runtime
14891490

1491+
License Identifier: Apache-2.0
1492+
1493+
Subdependencies:
1494+
* `github.com/aws/aws-sdk-go-v2`
1495+
* `github.com/aws/aws-sdk-go-v2/config`
1496+
* `github.com/aws/aws-sdk-go-v2/credentials`
1497+
* `github.com/aws/aws-sdk-go-v2/service/sts`
1498+
* `github.com/aws/smithy-go`
1499+
* `github.com/cenkalti/backoff/v4`
1500+
* `github.com/go-logr/logr`
1501+
* `github.com/go-logr/zapr`
1502+
* `github.com/google/go-cmp`
1503+
* `github.com/itchyny/gojq`
1504+
* `github.com/jaypipes/envutil`
1505+
* `github.com/micahhausler/aws-iam-policy`
1506+
* `github.com/pkg/errors`
1507+
* `github.com/prometheus/client_golang`
1508+
* `github.com/spf13/pflag`
1509+
* `github.com/stretchr/testify`
1510+
* `go.uber.org/zap`
1511+
* `k8s.io/api`
1512+
* `k8s.io/apimachinery`
1513+
* `k8s.io/client-go`
1514+
* `k8s.io/klog/v2`
1515+
* `k8s.io/utils`
1516+
* `sigs.k8s.io/controller-runtime`
1517+
* `github.com/aws/aws-sdk-go-v2/feature/ec2/imds`
1518+
* `github.com/aws/aws-sdk-go-v2/internal/configsources`
1519+
* `github.com/aws/aws-sdk-go-v2/internal/endpoints/v2`
1520+
* `github.com/aws/aws-sdk-go-v2/internal/ini`
1521+
* `github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding`
1522+
* `github.com/aws/aws-sdk-go-v2/service/internal/presigned-url`
1523+
* `github.com/aws/aws-sdk-go-v2/service/sso`
1524+
* `github.com/aws/aws-sdk-go-v2/service/ssooidc`
1525+
* `github.com/beorn7/perks`
1526+
* `github.com/cespare/xxhash/v2`
1527+
* `github.com/davecgh/go-spew`
1528+
* `github.com/emicklei/go-restful/v3`
1529+
* `github.com/evanphx/json-patch`
1530+
* `github.com/evanphx/json-patch/v5`
1531+
* `github.com/fsnotify/fsnotify`
1532+
* `github.com/fxamacker/cbor/v2`
1533+
* `github.com/go-openapi/jsonpointer`
1534+
* `github.com/go-openapi/jsonreference`
1535+
* `github.com/go-openapi/swag`
1536+
* `github.com/google/btree`
1537+
* `github.com/google/gnostic-models`
1538+
* `github.com/google/uuid`
1539+
* `github.com/itchyny/timefmt-go`
1540+
* `github.com/josharian/intern`
1541+
* `github.com/json-iterator/go`
1542+
* `github.com/mailru/easyjson`
1543+
* `github.com/modern-go/concurrent`
1544+
* `github.com/modern-go/reflect2`
1545+
* `github.com/munnerz/goautoneg`
1546+
* `github.com/pmezard/go-difflib`
1547+
* `github.com/prometheus/client_model`
1548+
* `github.com/prometheus/common`
1549+
* `github.com/prometheus/procfs`
1550+
* `github.com/stretchr/objx`
1551+
* `github.com/x448/float16`
1552+
* `go.uber.org/multierr`
1553+
* `go.yaml.in/yaml/v2`
1554+
* `go.yaml.in/yaml/v3`
1555+
* `golang.org/x/net`
1556+
* `golang.org/x/oauth2`
1557+
* `golang.org/x/sync`
1558+
* `golang.org/x/sys`
1559+
* `golang.org/x/term`
1560+
* `golang.org/x/text`
1561+
* `golang.org/x/time`
1562+
* `gomodules.xyz/jsonpatch/v2`
1563+
* `google.golang.org/protobuf`
1564+
* `gopkg.in/evanphx/json-patch.v4`
1565+
* `gopkg.in/inf.v0`
1566+
* `gopkg.in/yaml.v3`
1567+
* `k8s.io/apiextensions-apiserver`
1568+
* `k8s.io/kube-openapi`
1569+
* `sigs.k8s.io/json`
1570+
* `sigs.k8s.io/randfill`
1571+
* `sigs.k8s.io/structured-merge-diff/v6`
1572+
* `sigs.k8s.io/yaml`
1573+
1574+
#### github.com/aws/aws-sdk-go-v2
1575+
1576+
License Identifier: Apache-2.0
1577+
1578+
1579+
1580+
1581+
1582+
1583+
1584+
1585+
1586+
1587+
1588+
1589+
1590+
1591+
1592+
1593+
1594+
1595+
1596+
1597+
1598+
1599+
1600+
1601+
1602+
1603+
1604+
1605+
1606+
1607+
1608+
1609+
1610+
1611+
1612+
1613+
1614+
1615+
1616+
1617+
1618+
1619+
1620+
1621+
1622+
1623+
1624+
1625+
1626+
1627+
1628+
1629+
1630+
1631+
1632+
1633+
1634+
1635+
1636+
1637+
1638+
1639+
1640+
1641+
1642+
1643+
1644+
1645+
1646+
#### github.com/evanphx/json-patch
1647+
1648+
License Identifier: BSD-3-Clause
1649+
1650+
Copyright (c) 2014, Evan Phoenix
1651+
All rights reserved.
1652+
1653+
Redistribution and use in source and binary forms, with or without
1654+
modification, are permitted provided that the following conditions are met:
1655+
1656+
* Redistributions of source code must retain the above copyright notice, this
1657+
list of conditions and the following disclaimer.
1658+
* Redistributions in binary form must reproduce the above copyright notice,
1659+
this list of conditions and the following disclaimer in the documentation
1660+
and/or other materials provided with the distribution.
1661+
* Neither the name of the Evan Phoenix nor the names of its contributors
1662+
may be used to endorse or promote products derived from this software
1663+
without specific prior written permission.
1664+
1665+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1666+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1667+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1668+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
1669+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1670+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1671+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1672+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
1673+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1674+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1675+
1676+
1677+
1678+
1679+
1680+
1681+
1682+
1683+
1684+
1685+
1686+
1687+
1688+
1689+
1690+
1691+
1692+
1693+
1694+
1695+
1696+
1697+
1698+
1699+
1700+
1701+
1702+
1703+
1704+
1705+
1706+
1707+
1708+
1709+
1710+
1711+
1712+
1713+
1714+
1715+
1716+
#### github.com/stretchr/objx
1717+
1718+
License Identifier: MIT
1719+
1720+
The MIT License
1721+
1722+
Copyright (c) 2014 Stretchr, Inc.
1723+
Copyright (c) 2017-2018 objx contributors
1724+
1725+
Permission is hereby granted, free of charge, to any person obtaining a copy
1726+
of this software and associated documentation files (the "Software"), to deal
1727+
in the Software without restriction, including without limitation the rights
1728+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1729+
copies of the Software, and to permit persons to whom the Software is
1730+
furnished to do so, subject to the following conditions:
1731+
1732+
The above copyright notice and this permission notice shall be included in all
1733+
copies or substantial portions of the Software.
1734+
1735+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1736+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1737+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1738+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1739+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1740+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1741+
SOFTWARE.
14901742

14911743

14921744

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ack_generate_info:
2-
build_date: "2026-06-12T23:17:09Z"
3-
build_hash: 2970ca9b3789515150e27ab80630175a8c77cba4
2+
build_date: "2026-06-24T22:20:08Z"
3+
build_hash: 2ae5d2cfadaa2a10b2ccb9e73a111b2a91c36642
44
go_version: go1.26.3
5-
version: v0.59.1-7-g2970ca9
6-
api_directory_checksum: 16a17b411667cbada70721f11c50549e74f9e5e5
5+
version: v0.60.0
6+
api_directory_checksum: 4ad83c75c5ecc99a74fd2ff32e1e348d6aef8945
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.41.5
99
generator_config_info:
10-
file_checksum: 7843398747a46af3c5d11a861babf56fb7cffcff
10+
file_checksum: 2dee3f6269d097dc5940c49648127b1e39f892c5
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

apis/v1alpha1/generator.yaml

Lines changed: 82 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,26 @@
11
ignore:
2-
resource_names:
3-
- Index
2+
resource_names: []
43
field_paths:
5-
# Get/DeleteVectorBucket reject specifying both vectorBucketName and
6-
# vectorBucketArn. ACK would populate the ARN from status metadata, so drop
7-
# the ARN input member and let the read/delete key off the (renamed) name.
4+
# CreateIndex accepts vectorBucketName OR vectorBucketArn as alternative
5+
# parents. We model only the VectorBucketName reference, so drop the
6+
# redundant vectorBucketArn arm from the Index spec.
7+
- CreateIndexInput.VectorBucketArn
8+
# Get/Delete reject specifying both the name and the ARN identifiers. ACK
9+
# would populate the ARN from status metadata, so drop the ARN input member
10+
# and let these operations key off the name(s).
811
- GetVectorBucketInput.VectorBucketArn
912
- DeleteVectorBucketInput.VectorBucketArn
13+
- GetIndexInput.IndexArn
14+
- DeleteIndexInput.IndexArn
1015

1116
operations:
1217
GetVectorBucket:
1318
# GetVectorBucketOutput wraps the resource in a `vectorBucket` member.
1419
# Flatten it so the resource fields populate directly.
1520
output_wrapper_field_path: VectorBucket
21+
GetIndex:
22+
# GetIndexOutput wraps the resource in an `index` member.
23+
output_wrapper_field_path: Index
1624

1725
resources:
1826
VectorBucket:
@@ -72,3 +80,72 @@ resources:
7280
# custom update method.
7381
update_operation:
7482
custom_method_name: customUpdateVectorBucket
83+
84+
Index:
85+
fields:
86+
# Primary key (child resource scoped to a VectorBucket). The SDK field is
87+
# `indexName`; rename it to `Name` (ACK convention) via the resource-level
88+
# renames block below. Immutable: there is no rename/update API.
89+
Name:
90+
is_primary_key: true
91+
is_immutable: true
92+
# Parent VectorBucket, referenced by name (same-service reference — do
93+
# NOT set service_name). Immutable.
94+
VectorBucketName:
95+
is_immutable: true
96+
references:
97+
resource: VectorBucket
98+
path: Spec.Name
99+
# All index configuration is set at create and cannot be changed.
100+
DataType:
101+
is_immutable: true
102+
Dimension:
103+
is_immutable: true
104+
DistanceMetric:
105+
is_immutable: true
106+
MetadataConfiguration:
107+
is_immutable: true
108+
# Encryption is set only at create (no update API). S3 Vectors applies a
109+
# server-side default when the user omits it, so late-initialize the
110+
# observed value back into the spec to preserve drift detection.
111+
EncryptionConfiguration:
112+
late_initialize:
113+
skip_incomplete_check: {}
114+
# Cross-resource reference to a KMS Key for SSE-KMS encryption.
115+
EncryptionConfiguration.KMSKeyARN:
116+
references:
117+
resource: Key
118+
service_name: kms
119+
path: Status.ACKResourceMetadata.ARN
120+
# AWS-assigned creation timestamp from GetIndex (path is relative to the
121+
# `index` wrapper flattened above).
122+
CreationTime:
123+
is_read_only: true
124+
from:
125+
operation: GetIndex
126+
path: Index.CreationTime
127+
renames:
128+
operations:
129+
CreateIndex:
130+
input_fields:
131+
IndexName: Name
132+
GetIndex:
133+
input_fields:
134+
IndexName: Name
135+
DeleteIndex:
136+
input_fields:
137+
IndexName: Name
138+
exceptions:
139+
errors:
140+
404:
141+
code: NotFoundException
142+
terminal_codes:
143+
- ValidationException
144+
hooks:
145+
# GetIndex does not return tags; fetch them via ListTagsForResource so
146+
# the Spec.Tags delta is accurate.
147+
sdk_read_one_post_set_output:
148+
template_path: hooks/index/sdk_read_one_post_set_output.go.tpl
149+
# No UpdateIndex API; the only mutable surface is Tags.
150+
update_operation:
151+
custom_method_name: customUpdateIndex

0 commit comments

Comments
 (0)