Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions openapi/management-open-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12761,6 +12761,10 @@ components:
bucket:
type: string
description: Name of the S3 bucket
partition:
type: string
default: aws
description: AWS partition used when constructing S3 ARNs for vended-credential policies.
endpoint:
type:
- string
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lakekeeper/console-components",
"version": "0.20.0",
"version": "0.21.0",
"description": "A library of Vue components for Lakekeeper console applications",
"type": "module",
"main": "dist/console-components.umd.js",
Expand Down
28 changes: 28 additions & 0 deletions src/components/WarehouseStorageFormS3.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,18 @@

<!-- 2. How do we reach it? Only what this flavour actually needs. -->
<v-row dense class="mb-3">
<v-col v-if="flavor === 'aws'" cols="12" md="6">
<v-combobox
density="compact"
v-model="profile.partition"
hint="AWS partition the bucket lives in — used to build ARNs for vended credentials"
persistent-hint
:items="s3Partitions"
label="Partition *"
:error="!profile.partition"
placeholder="aws"
:rules="[rules.required]"></v-combobox>
</v-col>
<v-col cols="12" md="6">
<v-combobox
density="compact"
Expand Down Expand Up @@ -437,6 +449,8 @@ const profile = reactive<Record<string, any>>({
bucket: '',
region: props.flavor === 's3-compat' ? 'local' : '',
flavor: props.flavor === 'aws' ? 'aws' : 's3-compat',
// Only AWS builds ARNs from a partition; the S3-compatible flavours have none.
...(props.flavor === 'aws' ? { partition: 'aws' } : {}),
'remote-signing-enabled': true,
'sts-enabled': props.flavor === 'cloudflare-r2' || props.flavor === 'aliyun-oss',
});
Expand All @@ -451,6 +465,10 @@ onMounted(() => {
if (props.initial?.['storage-credential'])
Object.assign(credential, props.initial['storage-credential']);

// Warehouses created before the field existed seed a profile without it. Set
// the default before the baseline is taken, so it does not read as an edit.
if (props.flavor === 'aws') profile.partition ??= 'aws';

const layout = profile['storage-layout'];
if (layout?.type) {
layoutType.value = layout.type;
Expand Down Expand Up @@ -647,6 +665,16 @@ watch(
{ deep: true },
);

const s3Partitions = [
'aws',
'aws-cn',
'aws-us-gov',
'aws-iso',
'aws-iso-b',
'aws-iso-e',
'aws-iso-f',
];

const regions = [
'us-east-1',
'us-east-2',
Expand Down
4 changes: 4 additions & 0 deletions src/gen/management/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2446,6 +2446,10 @@ export type S3Profile = {
* Name of the S3 bucket
*/
bucket: string;
/**
* AWS partition used when constructing S3 ARNs for vended-credential policies.
*/
partition?: string;
/**
* Optional endpoint to use for S3 requests, if not provided
* the region will be used to determine the endpoint.
Expand Down