YCStorageBucket
Статья создана
Обновлена 29 декабря 2025 г.
YCStorageBucket is a Gwin custom resource for referencing S3 buckets from Yandex Object Storage. It allows you to use Object Storage buckets as backend targets in HTTPRoute, IngressBackendGroup, Ingress resources for serving static content or as part of traffic routing strategies.
Cheatsheet
apiVersion: gwin.yandex.cloud/v1
kind: YCStorageBucket
metadata:
name: example-bucket
namespace: example-ns
spec:
bucketRef:
bucketName: "my-static-content-bucket"
Reference the YCStorageBucket as a backend in HTTPRoute:
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: static-content-route
namespace: example-ns
spec:
parentRefs:
- name: example-gateway
hostnames:
- "static.example.com"
rules:
- matches:
- path:
type: PathPrefix
value: "/assets"
backendRefs:
- group: gwin.yandex.cloud
kind: YCStorageBucket
name: example-bucket
weight: 100
To use YCStorageBucket as a backend for Ingress, use IngressBackendGroup.
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: static-content-ingress
namespace: example-ns
annotations:
...
spec:
ingressClassName: gwin-default
rules:
- host: static.example.com
http:
paths:
- pathType: Prefix
path: "/assets"
backend:
resource:
apiGroup: gwin.yandex.cloud
kind: IngressBackendGroup
name: static-bg
---
apiVersion: gwin.yandex.cloud/v1
kind: IngressBackendGroup
metadata:
name: static-bg
namespace: example-ns
spec:
type: HTTP
backends:
- name: some-bucket
backendRef:
group: gwin.yandex.cloud
kind: YCStorageBucket
name: example-bucket
weight: 100
| Field | Description |
|---|---|
| metadata | ObjectMeta Standard Kubernetes metadata. |
| spec | YCStorageBucketSpec Storage bucket specification. |
YCStorageBucketSpec
YCStorageBucketSpec defines the desired state of YCStorageBucket.
Appears in: YCStorageBucket
| Field | Description |
|---|---|
| bucketRef | YCStorageBucketReference Reference to the Yandex Cloud S3 Bucket. |
YCStorageBucketReference
YCStorageBucketReference is a reference to a Yandex Cloud S3 Bucket.
Appears in: YCStorageBucketSpec
| Field | Description |
|---|---|
| bucketName | string Name of the Yandex Cloud S3 Bucket. Example: my-static-content-bucket |