Skip to content
Merged
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
5 changes: 1 addition & 4 deletions .golangci.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -259,13 +259,10 @@ linters:
misspell:
mode: restricted # only check comments
revive:
enable-default-rules: true
rules:
- name: context-as-argument
- name: duplicated-imports
- name: early-return
- name: exported
- name: unreachable-code
- name: unused-parameter
custom:
logcheck:
path: <<LOGCHECK_PLUGIN_PATH>>/logcheck.so
Expand Down
8 changes: 4 additions & 4 deletions charts/gardener/operator/files/crd-gardens.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2025,15 +2025,15 @@ spec:
properties:
begin:
description: |-
Begin is the beginning of the time window in the format HHMMSS+ZONE, e.g. "220000+0100".
Begin is the beginning of the time window in the format HHMMSS±ZONE, e.g. "220000+0100" or "220000-0500".
If not present, a random value will be computed.
pattern: ([0-1][0-9]|2[0-3])[0-5][0-9][0-5][0-9]\+[0-1][0-4]00
pattern: ([0-1][0-9]|2[0-3])[0-5][0-9][0-5][0-9]([+](0[0-9]|1[0-4])|[-](0[0-9]|1[0-2]))00
type: string
end:
description: |-
End is the end of the time window in the format HHMMSS+ZONE, e.g. "220000+0100".
End is the end of the time window in the format HHMMSS±ZONE, e.g. "220000+0100" or "220000-0500".
If not present, the value will be computed based on the "Begin" value.
pattern: ([0-1][0-9]|2[0-3])[0-5][0-9][0-5][0-9]\+[0-1][0-4]00
pattern: ([0-1][0-9]|2[0-3])[0-5][0-9][0-5][0-9]([+](0[0-9]|1[0-4])|[-](0[0-9]|1[0-2]))00
type: string
required:
- begin
Expand Down
4 changes: 2 additions & 2 deletions docs/api-reference/core.md
Original file line number Diff line number Diff line change
Expand Up @@ -8208,7 +8208,7 @@ string
</em>
</td>
<td>
<p>Begin is the beginning of the time window in the format HHMMSS+ZONE, e.g. "220000+0100".<br />If not present, a random value will be computed.</p>
<p>Begin is the beginning of the time window in the format HHMMSS±ZONE, e.g. "220000+0100" or "220000-0500".<br />If not present, a random value will be computed.</p>
</td>
</tr>
<tr>
Expand All @@ -8219,7 +8219,7 @@ string
</em>
</td>
<td>
<p>End is the end of the time window in the format HHMMSS+ZONE, e.g. "220000+0100".<br />If not present, the value will be computed based on the "Begin" value.</p>
<p>End is the end of the time window in the format HHMMSS±ZONE, e.g. "220000+0100" or "220000-0500".<br />If not present, the value will be computed based on the "Begin" value.</p>
</td>
</tr>

Expand Down
8 changes: 4 additions & 4 deletions example/operator/10-crd-operator.gardener.cloud_gardens.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2025,15 +2025,15 @@ spec:
properties:
begin:
description: |-
Begin is the beginning of the time window in the format HHMMSS+ZONE, e.g. "220000+0100".
Begin is the beginning of the time window in the format HHMMSS±ZONE, e.g. "220000+0100" or "220000-0500".
If not present, a random value will be computed.
pattern: ([0-1][0-9]|2[0-3])[0-5][0-9][0-5][0-9]\+[0-1][0-4]00
pattern: ([0-1][0-9]|2[0-3])[0-5][0-9][0-5][0-9]([+](0[0-9]|1[0-4])|[-](0[0-9]|1[0-2]))00
type: string
end:
description: |-
End is the end of the time window in the format HHMMSS+ZONE, e.g. "220000+0100".
End is the end of the time window in the format HHMMSS±ZONE, e.g. "220000+0100" or "220000-0500".
If not present, the value will be computed based on the "Begin" value.
pattern: ([0-1][0-9]|2[0-3])[0-5][0-9][0-5][0-9]\+[0-1][0-4]00
pattern: ([0-1][0-9]|2[0-3])[0-5][0-9][0-5][0-9]([+](0[0-9]|1[0-4])|[-](0[0-9]|1[0-2]))00
type: string
required:
- begin
Expand Down
8 changes: 4 additions & 4 deletions extensions/pkg/webhook/cloudprovider/mock/mocks.go

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

14 changes: 7 additions & 7 deletions extensions/pkg/webhook/cloudprovider/mutator.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

// Ensurer ensures that the cloudprovider secret conforms to the provider requirements.
type Ensurer interface {
EnsureCloudProviderSecret(ctx context.Context, gctx extensionscontextwebhook.GardenContext, new, old *corev1.Secret) error
EnsureCloudProviderSecret(ctx context.Context, gctx extensionscontextwebhook.GardenContext, newSecret, oldSecret *corev1.Secret) error
}

// NewMutator creates a new cloudprovider mutator.
Expand All @@ -39,12 +39,12 @@ type mutator struct {
}

// Mutate validates and if needed mutates the given object.
func (m *mutator) Mutate(ctx context.Context, new, old client.Object) error {
if new.GetDeletionTimestamp() != nil {
func (m *mutator) Mutate(ctx context.Context, newObj, oldObj client.Object) error {
if newObj.GetDeletionTimestamp() != nil {
return nil
}

newSecret, ok := new.(*corev1.Secret)
newSecret, ok := newObj.(*corev1.Secret)
if !ok {
return fmt.Errorf("could not mutate: object is not of type %q", "Secret")
}
Expand All @@ -53,14 +53,14 @@ func (m *mutator) Mutate(ctx context.Context, new, old client.Object) error {
}

var oldSecret *corev1.Secret
if old != nil {
oldSecret, ok = old.(*corev1.Secret)
if oldObj != nil {
oldSecret, ok = oldObj.(*corev1.Secret)
if !ok {
return fmt.Errorf("could not mutate: old object could not be casted to type %q", "Secret")
}
}

etcx := extensionscontextwebhook.NewGardenContext(m.client, new)
etcx := extensionscontextwebhook.NewGardenContext(m.client, newObj)
webhook.LogMutation(m.logger, newSecret.Kind, newSecret.Namespace, newSecret.Name)
return m.ensurer.EnsureCloudProviderSecret(ctx, etcx, newSecret, oldSecret)
}
Loading
Loading