-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
resolve merge conflicts and revendor
- Loading branch information
Showing
915 changed files
with
173,481 additions
and
110,956 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,37 @@ | ||
--- | ||
name: Bug Report | ||
about: Report a bug | ||
about: Report a bug encountered while operating Gardener | ||
labels: kind/bug | ||
|
||
--- | ||
|
||
**How to categorize this issue?** | ||
<!-- | ||
Please select area, kind, and priority for this issue. This helps the community categorizing it. | ||
Replace below TODOs or exchange the existing identifiers with those that fit best in your opinion. | ||
If multiple identifiers make sense you can also state the commands multiple times, e.g. | ||
/area control-plane | ||
/area auto-scaling | ||
... | ||
"/area" identifiers: audit-logging|auto-scaling|backup|certification|control-plane-migration|control-plane|cost|delivery|dev-productivity|disaster-recovery|documentation|high-availability|logging|metering|monitoring|networking|open-source|ops-productivity|os|performance|quality|robustness|scalability|security|storage|testing|usability|user-management | ||
"/kind" identifiers: api-change|bug|cleanup|discussion|enhancement|epic|impediment|poc|post-mortem|question|regression|task|technical-debt|test | ||
"/priority" identifiers: 1|2|3|4|5 (ordered from greatest to least) | ||
--> | ||
/area TODO | ||
/kind bug | ||
/priority 3 | ||
|
||
**What happened**: | ||
|
||
**What you expected to happen**: | ||
|
||
**How to reproduce it (as minimally and precisely as possible)**: | ||
|
||
**Anything else we need to know**: | ||
**Anything else we need to know?**: | ||
|
||
**Environment**: | ||
|
||
- Kubernetes version (use `kubectl version`): | ||
- Cloud provider or hardware configuration: | ||
- Others: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,27 @@ | ||
--- | ||
name: Enhancement Request | ||
about: Suggest an enhancement | ||
about: Suggest an enhancement to the Gardener/MCM project | ||
labels: kind/enhancement | ||
|
||
--- | ||
|
||
**How to categorize this issue?** | ||
<!-- | ||
Please select area, kind, and priority for this issue. This helps the community categorizing it. | ||
Replace below TODOs or exchange the existing identifiers with those that fit best in your opinion. | ||
If multiple identifiers make sense you can also state the commands multiple times, e.g. | ||
/area control-plane | ||
/area auto-scaling | ||
... | ||
"/area" identifiers: audit-logging|auto-scaling|backup|certification|control-plane-migration|control-plane|cost|delivery|dev-productivity|disaster-recovery|documentation|high-availability|logging|metering|monitoring|networking|open-source|ops-productivity|os|performance|quality|robustness|scalability|security|storage|testing|usability|user-management | ||
"/kind" identifiers: api-change|bug|cleanup|discussion|enhancement|epic|impediment|poc|post-mortem|question|regression|task|technical-debt|test | ||
"/priority" identifiers: 1|2|3|4|5 (ordered from greatest to least) | ||
--> | ||
/area TODO | ||
/kind enhancement | ||
/priority 3 | ||
|
||
**What would you like to be added**: | ||
|
||
**Why is this needed**: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v0.40.0-dev | ||
v0.41.0-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/* | ||
Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
// Package k8sutils is used to provider helper consts and functions for k8s operations | ||
package k8sutils | ||
|
||
import ( | ||
"k8s.io/apimachinery/pkg/runtime/schema" | ||
"k8s.io/client-go/kubernetes" | ||
"k8s.io/klog" | ||
) | ||
|
||
const ( | ||
// VolumeAttachmentGroupName group name | ||
VolumeAttachmentGroupName = "storage.k8s.io" | ||
// VolumeAttachmentResourceName is the kind used for VolumeAttachment | ||
VolumeAttachmentResourceName = "volumeattachments" | ||
) | ||
|
||
// IsResourceSupported uses Discovery API to find out if the server supports | ||
// the given GroupResource. | ||
// If supported, it will return its groupVersion; Otherwise, it will return "" | ||
func IsResourceSupported( | ||
clientset kubernetes.Interface, | ||
gr schema.GroupResource, | ||
) bool { | ||
var ( | ||
foundDesiredGroup bool | ||
desiredGroupVersion string | ||
) | ||
|
||
discoveryClient := clientset.Discovery() | ||
groupList, err := discoveryClient.ServerGroups() | ||
if err != nil { | ||
return false | ||
} | ||
|
||
for _, group := range groupList.Groups { | ||
if group.Name == gr.Group { | ||
foundDesiredGroup = true | ||
desiredGroupVersion = group.PreferredVersion.GroupVersion | ||
break | ||
} | ||
} | ||
if !foundDesiredGroup { | ||
return false | ||
} | ||
|
||
resourceList, err := discoveryClient.ServerResourcesForGroupVersion(desiredGroupVersion) | ||
if err != nil { | ||
return false | ||
} | ||
|
||
for _, resource := range resourceList.APIResources { | ||
if resource.Name == gr.Resource { | ||
klog.V(3).Infof("Found Resource: %s/%s", gr.Group, gr.Resource) | ||
return true | ||
} | ||
} | ||
return false | ||
} |
Oops, something went wrong.