Skip to content

Commit e76ac80

Browse files
committed
Merge remote-tracking branch 'origin' into YDBOPS-9679
2 parents 45b67f0 + b98fd73 commit e76ac80

File tree

14 files changed

+28
-81
lines changed

14 files changed

+28
-81
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
2-
31
<!--- Please provide a general summary of your changes in the title above -->
42

53
## Pull request type

CONTRIBUTING.md

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,21 @@
11
# Notice to external contributors
22

3-
## How do I start?
3+
## Common
44

5-
We try to maintain a small but helpful selection of information on how ydb-k8s-operator is developed and released,
6-
as well as some details of its architecture. Please, have a look at the [docs folder](./docs/), its README functions
7-
as a table of content.
5+
YDB is a free and open project and we appreciate to receive contributions from our community.
86

9-
## A note on legal terms
7+
## Contributing code changes
108

11-
Hello! In order for us to accept patches and other contributions from you, you will have to adopt our Yandex Contributor License Agreement (the “**CLA**”). The current version of the CLA you may find here https://yandex.ru/legal/cla/?lang=en
9+
If you would like to contribute a new feature or a bug fix, please discuss your idea first on the GitHub issue.
10+
If there is no issue for your idea, please open one. It may be that somebody is already working on it,
11+
or that there are some complex obstacles that you should know about before starting the implementation.
12+
Usually there are several ways to fix a problem and it is important to find the right approach before spending time on a PR
13+
that cannot be merged.
1214

13-
By adopting the CLA, you state the following:
15+
## Provide a contribution
1416

15-
* You obviously wish and are willingly licensing your contributions to us for our open source projects under the terms of the CLA,
16-
* You has read the terms and conditions of the CLA and agree with them in full,
17-
* You are legally able to provide and license your contributions as stated,
18-
* We may use your contributions for our open source projects and for any other our project too,
19-
* We rely on your assurances concerning the rights of third parties in relation to your contributions.
20-
21-
If you agree with these principles, please read and adopt our CLA. By providing us your contributions, you hereby declare that you has already read and adopt our CLA, and we may freely merge your contributions with our corresponding open source project and use it in further in accordance with terms and conditions of the CLA.
22-
23-
## How to agree to CLA
24-
25-
If you are willing to adopt terms and conditions of the CLA, you are able to provide your contributions. When you submit your pull request, please add the following information into it:
26-
27-
```
28-
I hereby agree to the terms of the CLA available at: [link].
29-
```
30-
31-
Replace the bracketed text as follows:
32-
* [link] is the link to the current version of the CLA: https://yandex.ru/legal/cla/?lang=en.
33-
34-
It is enough to provide us such notification once.
17+
To make a contribution you should submit a pull request. There will probably be discussion about the pull request and,
18+
if any changes are needed, we would love to work with you to get your pull request merged.
3519

3620
## Other questions
3721

api/v1alpha1/const.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,10 @@ const (
3030
ConfigDir = "/opt/ydb/cfg"
3131
ConfigFileName = "config.yaml"
3232

33-
DatabaseEncryptionKeySecretDir = "encryption"
34-
DatabaseEncryptionKeySecretFile = "key.pem"
33+
DatabaseEncryptionKeySecretDir = "database_encryption"
34+
DatabaseEncryptionKeySecretFile = "key"
3535
DatabaseEncryptionKeyConfigFile = "key.txt"
3636

37-
DatastreamsIAMServiceAccountKeyDir = "datastreams"
38-
DatastreamsIAMServiceAccountKeyFile = "sa_key.json"
39-
4037
BinariesDir = "/opt/ydb/bin"
4138
DaemonBinaryName = "ydbd"
4239

api/v1alpha1/database_types.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,6 @@ type EncryptionConfig struct {
249249
type DatastreamsConfig struct {
250250
// +required
251251
Enabled bool `json:"enabled"`
252-
253-
// +required
254-
IAMServiceAccountKey *corev1.SecretKeySelector `json:"iam_service_account_key,omitempty"`
255252
}
256253

257254
type DatabaseServices struct {

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 1 addition & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deploy/ydb-operator/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.5.23
18+
version: 0.5.25
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
# It is recommended to use it with quotes.
24-
appVersion: "0.5.23"
24+
appVersion: "0.5.25"

internal/controllers/storage/controller_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ var _ = Describe("Storage controller medium tests", func() {
123123
}, &foundStorage)).Should(Succeed())
124124

125125
foundConfigurationChecksumAnnotation := false
126-
if podAnnotations[annotations.ConfigurationChecksum] == resources.GetConfigurationChecksum(foundStorage.Spec.Configuration) {
126+
if podAnnotations[annotations.ConfigurationChecksum] == resources.SHAChecksum(foundStorage.Spec.Configuration) {
127127
foundConfigurationChecksumAnnotation = true
128128
}
129129
Expect(foundConfigurationChecksumAnnotation).To(BeTrue())

internal/resources/database.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func (b *DatabaseBuilder) GetResourceBuilders(restConfig *rest.Config) []Resourc
4343
statefulSetLabels.Merge(map[string]string{labels.StatefulsetComponent: b.Name})
4444

4545
statefulSetAnnotations := CopyDict(b.Spec.AdditionalAnnotations)
46-
statefulSetAnnotations[annotations.ConfigurationChecksum] = GetConfigurationChecksum(b.Spec.Configuration)
46+
statefulSetAnnotations[annotations.ConfigurationChecksum] = SHAChecksum(b.Spec.Configuration)
4747

4848
grpcServiceLabels := databaseLabels.Copy()
4949
grpcServiceLabels.Merge(b.Spec.Service.GRPC.AdditionalLabels)
@@ -123,7 +123,7 @@ func (b *DatabaseBuilder) GetResourceBuilders(restConfig *rest.Config) []Resourc
123123
api.DatabaseEncryptionKeySecretDir,
124124
api.DatabaseEncryptionKeySecretFile,
125125
),
126-
ID: b.Name,
126+
ID: SHAChecksum(b.Spec.StorageClusterRef.Name),
127127
Pin: b.Spec.Encryption.Pin,
128128
Version: 1,
129129
},

internal/resources/database_statefulset.go

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@ func (b *DatabaseStatefulSetBuilder) buildVolumes() []corev1.Volume {
183183
}
184184

185185
if b.Spec.Datastreams != nil && b.Spec.Datastreams.Enabled {
186-
volumes = append(volumes, b.buildDatastreamsIAMServiceAccountKeyVolume())
187186
if b.Spec.Service.Datastreams.TLSConfiguration.Enabled {
188187
volumes = append(volumes, buildTLSVolume(datastreamsTLSVolumeName, b.Spec.Service.Datastreams.TLSConfiguration))
189188
}
@@ -385,23 +384,6 @@ func (b *DatabaseStatefulSetBuilder) buildEncryptionVolumes() []corev1.Volume {
385384
return []corev1.Volume{encryptionKeySecret, encryptionKeyConfig}
386385
}
387386

388-
func (b *DatabaseStatefulSetBuilder) buildDatastreamsIAMServiceAccountKeyVolume() corev1.Volume {
389-
return corev1.Volume{
390-
Name: datastreamsIAMServiceAccountKeyVolumeName,
391-
VolumeSource: corev1.VolumeSource{
392-
Secret: &corev1.SecretVolumeSource{
393-
SecretName: b.Spec.Datastreams.IAMServiceAccountKey.Name,
394-
Items: []corev1.KeyToPath{
395-
{
396-
Key: b.Spec.Datastreams.IAMServiceAccountKey.Key,
397-
Path: api.DatastreamsIAMServiceAccountKeyFile,
398-
},
399-
},
400-
},
401-
},
402-
}
403-
}
404-
405387
func (b *DatabaseStatefulSetBuilder) buildContainer() corev1.Container {
406388
command, args := b.buildContainerArgs()
407389
imagePullPolicy := corev1.PullIfNotPresent
@@ -509,11 +491,6 @@ func (b *DatabaseStatefulSetBuilder) buildVolumeMounts() []corev1.VolumeMount {
509491
}
510492

511493
if b.Spec.Datastreams != nil && b.Spec.Datastreams.Enabled {
512-
volumeMounts = append(volumeMounts, corev1.VolumeMount{
513-
Name: datastreamsIAMServiceAccountKeyVolumeName,
514-
ReadOnly: true,
515-
MountPath: api.DatastreamsIAMServiceAccountKeyDir,
516-
})
517494
if b.Spec.Service.Datastreams.TLSConfiguration.Enabled {
518495
volumeMounts = append(volumeMounts, corev1.VolumeMount{
519496
Name: datastreamsTLSVolumeName,

internal/resources/databasenodeset.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func (b *DatabaseNodeSetResource) GetResourceBuilders(restConfig *rest.Config) [
6969
}
7070

7171
statefulSetAnnotations := CopyDict(b.Spec.AdditionalAnnotations)
72-
statefulSetAnnotations[annotations.ConfigurationChecksum] = GetConfigurationChecksum(b.Spec.Configuration)
72+
statefulSetAnnotations[annotations.ConfigurationChecksum] = SHAChecksum(b.Spec.Configuration)
7373

7474
var resourceBuilders []ResourceBuilder
7575
resourceBuilders = append(resourceBuilders,

0 commit comments

Comments
 (0)