Skip to content

Commit b156836

Browse files
author
covariance
committed
Helm chart created for yandex cloud connectors
1 parent f75d825 commit b156836

19 files changed

+915
-3
lines changed

Makefile

+19-3
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ help: ## Display this message.
3939

4040
##@ Development
4141

42-
manifests: ensure-controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects via controller-gen tool.
42+
manifest: ensure-controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects via controller-gen tool.
4343
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=connector-manager-role webhook paths="./..." \
4444
output:crd:artifacts:config=./config/base/crd \
4545
output:rbac:artifacts:config=./config/system \
@@ -57,9 +57,25 @@ vet: ## Run go vet against code.
5757
lint: ensure-linter ## Run golangci-lint (https://golangci-lint.run/) against code.
5858
$(GOLANGCI-LINT) run ./... --verbose
5959

60-
test: manifests generate fmt vet lint ## Run tests for this connector and common packages.
60+
test: manifest generate fmt vet lint ## Run tests for this connector and common packages.
6161
go test ./... -coverprofile cover.out
6262

63+
##@ Helm
64+
65+
CHART_NAME := yandex-cloud-connectors
66+
67+
helm-manifest: ensure-controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects for chart via controller-gen tool.
68+
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=connector-manager-role webhook paths="./..." \
69+
output:crd:artifacts:config=./helm/$(CHART_NAME)/crds \
70+
output:rbac:artifacts:config=./helm/$(CHART_NAME)/templates/system \
71+
output:webhook:artifacts:config=./helm/$(CHART_NAME)/templates/webhook
72+
73+
helm-license: ## Copy project license into chart.
74+
cp ./LICENSE ./helm/$(CHART_NAME)
75+
76+
77+
helm-generate: helm-manifest helm-license ## Execute all targets for helm chart creation.
78+
6379
##@ Build
6480

6581
local-build-manager: test ## Build manager binary locally.
@@ -105,7 +121,7 @@ docker-push: docker-push-manager docker-push-certifier ## Push all images to doc
105121

106122
##@ Deployment
107123

108-
install: manifests ## Deploy to the k8s cluster specified in ~/.kube/config.
124+
install: manifest ## Deploy to the k8s cluster specified in ~/.kube/config.
109125
kubectl apply -k ./config/base
110126

111127
uninstall: ## Undeploy from the k8s cluster specified in ~/.kube/config.
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: v2
2+
name: yandex-cloud-connectors
3+
description: Connectors to get control over lifetime of resources in Yandex Cloud from k8s.
4+
type: application
5+
6+
# This is the chart version. This version number should be incremented each time you make changes
7+
# to the chart and its templates, including the app version.
8+
# Versions are expected to follow Semantic Versioning (https://semver.org/)
9+
version: 0.1.0
10+
11+
# This is the version number of the application being deployed. This version number should be
12+
# incremented each time you make changes to the application. Versions are not expected to
13+
# follow Semantic Versioning. They should reflect the version the application is using.
14+
# It is recommended to use it with quotes.
15+
appVersion: "1.16.0"

helm/yandex-cloud-connectors/LICENSE

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
The MIT License (MIT)
3+
4+
Copyright (c) 2021 YANDEX LLC
5+
Author: Martynov Pavel <covariance@yandex-team.ru>
6+
7+
Permission is hereby granted, free of charge, to any person obtaining a copy
8+
of this software and associated documentation files (the "Software"), to deal
9+
in the Software without restriction, including without limitation the rights
10+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
copies of the Software, and to permit persons to whom the Software is
12+
furnished to do so, subject to the following conditions:
13+
14+
The above copyright notice and this permission notice shall be included in
15+
all copies or substantial portions of the Software.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23+
THE SOFTWARE.
24+
*/
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Yandex Cloud Connectors
2+
3+
*placeholder for chart description*
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
2+
---
3+
apiVersion: apiextensions.k8s.io/v1
4+
kind: CustomResourceDefinition
5+
metadata:
6+
annotations:
7+
controller-gen.kubebuilder.io/version: v0.6.0
8+
creationTimestamp: null
9+
name: staticaccesskeys.connectors.cloud.yandex.com
10+
spec:
11+
group: connectors.cloud.yandex.com
12+
names:
13+
kind: StaticAccessKey
14+
listKind: StaticAccessKeyList
15+
plural: staticaccesskeys
16+
shortNames:
17+
- sakey
18+
singular: staticaccesskey
19+
scope: Namespaced
20+
versions:
21+
- name: v1
22+
schema:
23+
openAPIV3Schema:
24+
description: StaticAccessKey is the Schema for the staticaccesskey API
25+
properties:
26+
apiVersion:
27+
description: 'APIVersion defines the versioned schema of this representation
28+
of an object. Servers should convert recognized schemas to the latest
29+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
30+
type: string
31+
kind:
32+
description: 'Kind is a string value representing the REST resource this
33+
object represents. Servers may infer this from the endpoint the client
34+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
35+
type: string
36+
metadata:
37+
type: object
38+
spec:
39+
description: StaticAccessKeySpec defines the desired state of StaticAccessKeySpec
40+
properties:
41+
serviceAccountId:
42+
description: 'ServiceAccountID: id of service account from which the
43+
key will be issued. Must be immutable.'
44+
type: string
45+
required:
46+
- serviceAccountId
47+
type: object
48+
status:
49+
description: StaticAccessKeyStatus defines the observed state of StaticAccessKey
50+
properties:
51+
keyId:
52+
description: 'KeyID: id of an issued key'
53+
type: string
54+
secretName:
55+
description: 'SecretRef: reference to a secret containing issued key
56+
values. It is always in the same namespace as the StaticAccessKey.'
57+
type: string
58+
type: object
59+
type: object
60+
served: true
61+
storage: true
62+
status:
63+
acceptedNames:
64+
kind: ""
65+
plural: ""
66+
conditions: []
67+
storedVersions: []
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
2+
---
3+
apiVersion: apiextensions.k8s.io/v1
4+
kind: CustomResourceDefinition
5+
metadata:
6+
annotations:
7+
controller-gen.kubebuilder.io/version: v0.6.0
8+
creationTimestamp: null
9+
name: yandexcontainerregistries.connectors.cloud.yandex.com
10+
spec:
11+
group: connectors.cloud.yandex.com
12+
names:
13+
kind: YandexContainerRegistry
14+
listKind: YandexContainerRegistryList
15+
plural: yandexcontainerregistries
16+
shortNames:
17+
- yc-registry
18+
singular: yandexcontainerregistry
19+
scope: Namespaced
20+
versions:
21+
- name: v1
22+
schema:
23+
openAPIV3Schema:
24+
description: YandexContainerRegistry is the Schema for the yandexcontainerregistries
25+
API
26+
properties:
27+
apiVersion:
28+
description: 'APIVersion defines the versioned schema of this representation
29+
of an object. Servers should convert recognized schemas to the latest
30+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
31+
type: string
32+
kind:
33+
description: 'Kind is a string value representing the REST resource this
34+
object represents. Servers may infer this from the endpoint the client
35+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
36+
type: string
37+
metadata:
38+
type: object
39+
spec:
40+
description: YandexContainerRegistrySpec defines the desired state of
41+
YandexContainerRegistry
42+
properties:
43+
folderId:
44+
description: 'FolderID: id of a folder in which registry is located.
45+
Must be immutable.'
46+
type: string
47+
name:
48+
description: 'Name: name of registry'
49+
maxLength: 63
50+
minLength: 3
51+
type: string
52+
required:
53+
- folderId
54+
- name
55+
type: object
56+
status:
57+
description: YandexContainerRegistryStatus defines the observed state
58+
of YandexContainerRegistry
59+
properties:
60+
createdAt:
61+
description: 'CreatedAt: RFC3339-formatted string, representing creation
62+
time of resource'
63+
type: string
64+
id:
65+
description: 'ID: id of registry'
66+
type: string
67+
labels:
68+
additionalProperties:
69+
type: string
70+
description: 'Labels: registry labels in key:value form. Maximum of
71+
64 labels for resource is allowed'
72+
type: object
73+
status:
74+
description: 'Status: status of registry. Valid values are: - CREATING
75+
- ACTIVE - DELETING'
76+
type: string
77+
type: object
78+
type: object
79+
served: true
80+
storage: true
81+
status:
82+
acceptedNames:
83+
kind: ""
84+
plural: ""
85+
conditions: []
86+
storedVersions: []
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
2+
---
3+
apiVersion: apiextensions.k8s.io/v1
4+
kind: CustomResourceDefinition
5+
metadata:
6+
annotations:
7+
controller-gen.kubebuilder.io/version: v0.6.0
8+
creationTimestamp: null
9+
name: yandexmessagequeues.connectors.cloud.yandex.com
10+
spec:
11+
group: connectors.cloud.yandex.com
12+
names:
13+
kind: YandexMessageQueue
14+
listKind: YandexMessageQueueList
15+
plural: yandexmessagequeues
16+
singular: yandexmessagequeue
17+
scope: Namespaced
18+
versions:
19+
- name: v1
20+
schema:
21+
openAPIV3Schema:
22+
description: YandexMessageQueue is the Schema for the yandex object storage
23+
API
24+
properties:
25+
apiVersion:
26+
description: 'APIVersion defines the versioned schema of this representation
27+
of an object. Servers should convert recognized schemas to the latest
28+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
29+
type: string
30+
kind:
31+
description: 'Kind is a string value representing the REST resource this
32+
object represents. Servers may infer this from the endpoint the client
33+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
34+
type: string
35+
metadata:
36+
type: object
37+
spec:
38+
description: YandexMessageQueueSpec defines the desired state of YandexMessageQueue
39+
properties:
40+
SAKeyName:
41+
description: 'SAKeyName: specifies name of the Static Access Key that
42+
is used to authenticate this Yandex Object Storage in the cloud.'
43+
type: string
44+
contentBasedDeduplication:
45+
default: false
46+
description: 'ContentBasedDeduplication: flag that enables deduplication
47+
by message contents.'
48+
type: boolean
49+
delaySeconds:
50+
default: 0
51+
description: 'DelaySeconds: Time in seconds for which messages are
52+
hidden after sending. Can be from 0 to 900 seconds (15 minutes).
53+
Defaults to 0.'
54+
type: integer
55+
fifoQueue:
56+
default: false
57+
description: 'FifoQueue: flag that states whether queue is FIFO or
58+
not. Must be immutable.'
59+
type: boolean
60+
maximumMessageSize:
61+
default: 262144
62+
description: 'MaximumMessageSize: maximal size of message in bytes.
63+
Can vary from 1024 (1 KiB) to 262144 bytes (256 KiB). Defaults to
64+
262144 (256 KiB).'
65+
type: integer
66+
messageRetentionPeriod:
67+
default: 345600
68+
description: 'MessageRetentionPeriod: duration of message storing.
69+
Can vary from 60 seconds (1 minute) to 1209600 seconds (14 days).
70+
Defaults to: 345600 (4 days).'
71+
type: integer
72+
name:
73+
description: 'Name: must be unique in Yandex Cloud. Can consist of
74+
lowercase latin letters, dashes, dots and numbers and must be up
75+
to 80 characters long. Name of FIFO queue must end with ".fifo".
76+
Must be immutable.'
77+
maxLength: 80
78+
pattern: '[a-z0-9][a-z0-9-_]*[a-z0-9]'
79+
type: string
80+
receiveMessageWaitTimeSeconds:
81+
default: 0
82+
description: 'ReceiveMessageWaitTimeSeconds: timeout for method "ReceiveMessage"
83+
measured in seconds. Can vary from 0 to 20 seconds. Defaults to
84+
0.'
85+
type: integer
86+
visibilityTimeout:
87+
default: 30
88+
description: 'VisibilityTimeout: timeout of messages visibility timeout.
89+
Can vary from 0 to 43000 seconds. Defaults to 30.'
90+
type: integer
91+
required:
92+
- SAKeyName
93+
- name
94+
type: object
95+
status:
96+
description: YandexMessageQueueStatus defines the observed state of YandexMessageQueue
97+
properties:
98+
queueUrl:
99+
description: URL of created queue
100+
type: string
101+
type: object
102+
type: object
103+
served: true
104+
storage: true
105+
status:
106+
acceptedNames:
107+
kind: ""
108+
plural: ""
109+
conditions: []
110+
storedVersions: []

0 commit comments

Comments
 (0)