Initial v1.0.0 commit

This commit is contained in:
Jakub Vavřík
2021-01-28 17:37:47 +01:00
commit 1481d27782
4164 changed files with 1264675 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
{
"hideMemberFields": [
"TypeMeta"
],
"hideTypePatterns": [
"ParseError$",
"List$"
],
"externalPackages": [
{
"typeMatchPrefix": "^k8s\\.io/(api|apimachinery/pkg/apis)/",
"docsURLTemplate": "https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.15/#{{lower .TypeIdentifier}}-{{arrIndex .PackageSegments -1}}-{{arrIndex .PackageSegments -2}}"
},
{
"typeMatchPrefix": "github.com/gardener/gardener/extensions/pkg/controller/healthcheck/config",
"docsURLTemplate": "https://github.com/gardener/gardener/extensions/pkg/controller/healthcheck/config"
}
],
"typeDisplayNamePrefixOverrides": {
"k8s.io/api/": "Kubernetes ",
"k8s.io/apimachinery/pkg/apis/": "Kubernetes "
},
"markdownDisabled": false
}

View File

@@ -0,0 +1,97 @@
<p>Packages:</p>
<ul>
<li>
<a href="#shoot-fleet-agent-service.extensions.config.gardener.cloud%2fv1alpha1">shoot-fleet-agent-service.extensions.config.gardener.cloud/v1alpha1</a>
</li>
</ul>
<h2 id="shoot-fleet-agent-service.extensions.config.gardener.cloud/v1alpha1">shoot-fleet-agent-service.extensions.config.gardener.cloud/v1alpha1</h2>
<p>
<p>Package v1alpha1 contains the Azure provider configuration API resources.</p>
</p>
Resource Types:
<ul><li>
<a href="#shoot-fleet-agent-service.extensions.config.gardener.cloud/v1alpha1.FleetAgentConfig">FleetAgentConfig</a>
</li></ul>
<h3 id="shoot-fleet-agent-service.extensions.config.gardener.cloud/v1alpha1.FleetAgentConfig">FleetAgentConfig
</h3>
<p>
<p>FleetAgentConfig configuration resource</p>
</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code>apiVersion</code></br>
string</td>
<td>
<code>
shoot-fleet-agent-service.extensions.config.gardener.cloud/v1alpha1
</code>
</td>
</tr>
<tr>
<td>
<code>kind</code></br>
string
</td>
<td><code>FleetAgentConfig</code></td>
</tr>
<tr>
<td>
<code>clientConnection</code></br>
<em>
k8s.io/component-base/config/v1alpha1.ClientConnectionConfiguration
</em>
</td>
<td>
<em>(Optional)</em>
<p>ClientConnection specifies the kubeconfig file and client connection
settings for the proxy server to use when communicating with the apiserver.</p>
</td>
</tr>
<tr>
<td>
<code>labels</code></br>
<em>
map[string]string
</em>
</td>
<td>
<p>labels to use in Fleet Cluster registration</p>
</td>
</tr>
<tr>
<td>
<code>namespace</code></br>
<em>
string
</em>
</td>
<td>
<p>namespace to store clusters registrations in Fleet managers cluster</p>
</td>
</tr>
<tr>
<td>
<code>healthCheckConfig</code></br>
<em>
<a href="https://github.com/gardener/gardener/extensions/pkg/controller/healthcheck/config">
github.com/gardener/gardener/extensions/pkg/controller/healthcheck/config.HealthCheckConfig
</a>
</em>
</td>
<td>
</td>
</tr>
</tbody>
</table>
<hr/>
<p><em>
Generated with <a href="https://github.com/ahmetb/gen-crd-api-reference-docs">gen-crd-api-reference-docs</a>
</em></p>

57
hack/component_descriptor Executable file
View File

@@ -0,0 +1,57 @@
#!/usr/bin/env bash
# taken from github.com/gardener and modified slightly to acommodate changed image-repository for this repository
set -e
repo_root_dir="$1"
repo_name="${2:-github.com/gardener/gardener}"
descriptor_out_file="${COMPONENT_DESCRIPTOR_PATH}"
echo "enriching creating component descriptor from ${BASE_DEFINITION_PATH}"
if [[ -f "$repo_root_dir/charts/images.yaml" ]]; then
images="$(yaml2json < "$repo_root_dir/charts/images.yaml")"
eval "$(jq -r ".images |
map(select(.sourceRepository != \"$repo_name\") |
if (.name == \"hyperkube\" or .name == \"kube-apiserver\" or .name == \"kube-controller-manager\" or .name == \"kube-scheduler\" or .name == \"kube-proxy\" or .repository == \"k8s.gcr.io/hyperkube\") then
\"--generic-dependencies '{\\\"name\\\": \\\"\" + .name + \"\\\", \\\"version\\\": \\\"\" + .tag + \"\\\"}'\"
elif (.repository | startswith(\"eu.gcr.io/gardener-project/cert-controller-manager\")) then
\"--component-dependencies '{\\\"name\\\": \\\"\" + .sourceRepository + \"\\\", \\\"version\\\": \\\"\" + .tag + \"\\\"}'\"
else
\"--container-image-dependencies '{\\\"name\\\": \\\"\" + .name + \"\\\", \\\"image_reference\\\": \\\"\" + .repository + \":\" + .tag + \"\\\", \\\"version\\\": \\\"\" + .tag + \"\\\"}'\"
end) |
\"${ADD_DEPENDENCIES_CMD} \\\\\n\" +
join(\" \\\\\n\")" <<< "$images")"
fi
if [[ -d "$repo_root_dir/charts/" ]]; then
for image_tpl_path in "$repo_root_dir/charts/"*"/templates/_images.tpl"; do
if [[ ! -f "$image_tpl_path" ]]; then
continue
fi
outputFile=$(sed 's/{{-//' $image_tpl_path | sed 's/}}//' | sed 's/define//' | sed 's/-//' | sed 's/end//' | sed 's/"//' | sed 's/"//' |sed 's/image.//' | sed -e 's/^[ \t]*//' | awk -v RS= '{for (i=1; i<=NF; i++) printf "%s%s", $i, (i==NF?"\n":" ")}')
echo "enriching creating component descriptor from ${image_tpl_path}"
while read p; do
line="$(echo -e "$p")"
IFS=' ' read -r -a array <<< "$line"
IFS=': ' read -r -a imageAndTag <<< ${array[1]}
NAME=${array[0]}
REPOSITORY=${imageAndTag[0]}
TAG=${imageAndTag[1]}
gardener="eu.gcr.io/gardener-project/gardener"
if [[ "$NAME" == "hyperkube" ]]; then
${ADD_DEPENDENCIES_CMD} --generic-dependencies "{\"name\": \"$NAME\", \"version\": \"$TAG\"}"
elif [[ $REPOSITORY =~ "eu.gcr.io/gardener-project/gardener"* ]]; then
${ADD_DEPENDENCIES_CMD} --generic-dependencies "{\"name\": \"$NAME\", \"version\": \"$TAG\"}"
else
${ADD_DEPENDENCIES_CMD} --container-image-dependencies "{\"name\": \"${NAME}\", \"image_reference\": \"${REPOSITORY}:${TAG}\", \"version\": \"$TAG\"}"
fi
done < <(echo "$outputFile")
done
fi
cp "${BASE_DEFINITION_PATH}" "${descriptor_out_file}"

32
hack/tools.go Normal file
View File

@@ -0,0 +1,32 @@
// +build tools
// Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file
//
// 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.
// This package imports things required by build scripts, to force `go mod` to see them as dependencies
package tools
import (
_ "github.com/gardener/gardener/.github"
_ "github.com/gardener/gardener/.github/ISSUE_TEMPLATE"
_ "github.com/gardener/gardener/hack"
_ "github.com/gardener/gardener/hack/.ci"
_ "github.com/gardener/gardener/hack/api-reference/template"
_ "github.com/ahmetb/gen-crd-api-reference-docs"
_ "github.com/gobuffalo/packr/v2/packr2"
_ "github.com/golang/mock/mockgen"
_ "github.com/onsi/ginkgo/ginkgo"
_ "k8s.io/code-generator"
)

49
hack/update-codegen.sh Executable file
View File

@@ -0,0 +1,49 @@
#!/bin/bash
#
# Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file
#
# 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.
set -o errexit
set -o nounset
set -o pipefail
rm -f $GOPATH/bin/*-gen
PROJECT_ROOT=$(dirname $0)/..
bash "${PROJECT_ROOT}"/vendor/k8s.io/code-generator/generate-internal-groups.sh \
deepcopy,defaulter \
github.com/javamachr/gardener-extension-shoot-fleet-agent/pkg/client/componentconfig \
github.com/javamachr/gardener-extension-shoot-fleet-agent/pkg/apis \
github.com/javamachr/gardener-extension-shoot-fleet-agent/pkg/apis \
"config:v1alpha1" \
--go-header-file "${PROJECT_ROOT}/vendor/github.com/gardener/gardener/hack/LICENSE_BOILERPLATE.txt"
bash "${PROJECT_ROOT}"/vendor/k8s.io/code-generator/generate-internal-groups.sh \
conversion \
github.com/javamachr/gardener-extension-shoot-fleet-agent/pkg/client/componentconfig \
github.com/javamachr/gardener-extension-shoot-fleet-agent/pkg/apis \
github.com/javamachr/gardener-extension-shoot-fleet-agent/pkg/apis \
"config:v1alpha1" \
--extra-peer-dirs=github.com/javamachr/gardener-extension-shoot-fleet-agent/pkg/apis/config,github.com/javamachr/gardener-extension-shoot-fleet-agent/pkg/apis/config/v1alpha1,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/apimachinery/pkg/conversion,k8s.io/apimachinery/pkg/runtime, github.com/gardener/gardener/extensions/pkg/controller/healthcheck/config/v1alpha1 \
--go-header-file "${PROJECT_ROOT}/vendor/github.com/gardener/gardener/hack/LICENSE_BOILERPLATE.txt"
bash "${PROJECT_ROOT}"/vendor/k8s.io/code-generator/generate-internal-groups.sh \
conversion,client \
github.com/javamachr/gardener-extension-shoot-fleet-agent/pkg/client/fleet \
github.com/rancher/fleet/pkg/apis \
github.com/rancher/fleet/pkg/apis \
"fleet.cattle.io:v1alpha1" \
--go-header-file "${PROJECT_ROOT}/vendor/github.com/gardener/gardener/hack/LICENSE_BOILERPLATE.txt"
#--extra-peer-dirs=github.com/javamachr/gardener-extension-shoot-fleet-agent/pkg/apis/config,github.com/javamachr/gardener-extension-shoot-fleet-agent/pkg/apis/config/v1alpha1,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/apimachinery/pkg/conversion,k8s.io/apimachinery/pkg/runtime, github.com/gardener/gardener/extensions/pkg/controller/healthcheck/config/v1alpha1

30
hack/update-github-templates.sh Executable file
View File

@@ -0,0 +1,30 @@
#!/bin/bash
#
# Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file
#
# 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.
set -o errexit
set -o nounset
set -o pipefail
mkdir -p "$(dirname $0)/../.github" "$(dirname $0)/../.github/ISSUE_TEMPLATE"
for file in `find "$(dirname $0)"/../vendor/github.com/gardener/gardener/.github -name '*.md'`; do
cat "$file" |\
sed 's/operating Gardener/working with this Gardener extension/g' |\
sed 's/to the Gardener project/for this extension/g' |\
sed 's/to Gardener/to this extension/g' |\
sed 's/- Gardener version:/- Gardener version (if relevant):\n- Extension version:/g' \
> "$(dirname $0)/../.github/${file#*.github/}"
done