-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat:add manual release #3342
Open
yuwenma
wants to merge
2
commits into
GoogleCloudPlatform:master
Choose a base branch
from
yuwenma:manual-release
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat:add manual release #3342
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -302,59 +302,25 @@ gke-addon-poststart: | |
operator-manager-bin: | ||
go build -o bin/operator-manager github.com/GoogleCloudPlatform/k8s-config-connector/operator/cmd/manager | ||
|
||
# Build kcc manifests for both standard and autopilot clusters | ||
.PHONY: all-manifests | ||
all-manifests: crd-manifests rbac-manifests build-operator-manifests | ||
cp config/installbundle/release-manifests/crds.yaml config/installbundle/release-manifests/standard/crds.yaml | ||
cp config/installbundle/release-manifests/rbac.yaml config/installbundle/release-manifests/standard/rbac.yaml | ||
kustomize build config/installbundle/release-manifests/standard -o config/installbundle/release-manifests/standard/manifests.yaml | ||
cp config/installbundle/release-manifests/crds.yaml config/installbundle/release-manifests/autopilot/crds.yaml | ||
cp config/installbundle/release-manifests/rbac.yaml config/installbundle/release-manifests/autopilot/rbac.yaml | ||
kustomize build config/installbundle/release-manifests/autopilot -o config/installbundle/release-manifests/autopilot/manifests.yaml | ||
|
||
|
||
# Build kcc manifests for standard GKE clusters | ||
.PHONY: config-connector-manifests-standard | ||
config-connector-manifests-standard: build-crd-manifests build-rbac-manifests build-operator-manifests | ||
cp config/installbundle/release-manifests/crds.yaml config/installbundle/release-manifests/standard/crds.yaml | ||
cp config/installbundle/release-manifests/rbac.yaml config/installbundle/release-manifests/standard/rbac.yaml | ||
kustomize build config/installbundle/release-manifests/standard -o config/installbundle/release-manifests/standard/manifests.yaml | ||
config-connector-manifests-standard: build-operator-manifests | ||
kustomize build config/installbundle/release-manifests/standard | ||
|
||
# Build kcc manifests for autopilot clusters | ||
.PHONY: config-connector-manifests-autopilot | ||
config-connector-manifests-autopilot: build-crd-manifests build-rbac-manifests build-operator-manifests | ||
cp config/installbundle/release-manifests/crds.yaml config/installbundle/release-manifests/autopilot/crds.yaml | ||
cp config/installbundle/release-manifests/rbac.yaml config/installbundle/release-manifests/autopilot/rbac.yaml | ||
kustomize build config/installbundle/release-manifests/autopilot -o config/installbundle/release-manifests/autopilot/manifests.yaml | ||
|
||
.PHONY: build-crd-manifests | ||
build-crd-manifests: | ||
go run sigs.k8s.io/controller-tools/cmd/[email protected] crd paths="./operator/pkg/apis/..." output:crd:artifacts:config=operator/config/crd/bases | ||
kustomize build operator/config/crd -o config/installbundle/release-manifests/crds.yaml | ||
|
||
.PHONY: build-rbac-manifests | ||
build-rbac-manifests: | ||
kustomize build operator/config/rbac -o config/installbundle/release-manifests/rbac.yaml | ||
config-connector-manifests-autopilot: build-operator-manifests | ||
kustomize build config/installbundle/release-manifests/autopilot | ||
|
||
.PHONY: build-operator-manifests | ||
build-operator-manifests: | ||
go run sigs.k8s.io/controller-tools/cmd/[email protected] crd paths="./operator/pkg/apis/..." output:crd:artifacts:config=operator/config/crd/bases | ||
make -C operator docker-build | ||
kustomize build operator/config/autopilot-manager -o config/installbundle/release-manifests/autopilot/manager.yaml | ||
kustomize build operator/config/manager -o config/installbundle/release-manifests/standard/manager.yaml | ||
|
||
.PHONY: push-operator-manifest | ||
push-operator-manifest: | ||
make -C operator docker-push | ||
|
||
.PHONY: clean-operator-manifests | ||
clean-release-manifests: | ||
rm config/installbundle/release-manifests/crds.yaml | ||
rm config/installbundle/release-manifests/rbac.yaml | ||
rm config/installbundle/release-manifests/standard/manager.yaml | ||
rm config/installbundle/release-manifests/autopilot/manager.yaml | ||
rm config/installbundle/release-manifests/standard/manifests.yaml | ||
rm config/installbundle/release-manifests/autopilot/manifests.yaml | ||
|
||
.PHONY: deploy-kcc-standard | ||
deploy-kcc-standard: docker-build docker-push config-connector-manifests-standard push-operator-manifest | ||
kubectl apply -f config/installbundle/release-manifests/standard/manifests.yaml ${CONTEXT_FLAG} | ||
|
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,43 @@ | ||
#!/usr/bin/env bash | ||
# Copyright 2022 Google LLC | ||
# | ||
# 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 | ||
|
||
# runs the config-connector build across all desired systems and architectures and creates a release tarball | ||
REPO_ROOT="$(git rev-parse --show-toplevel)" | ||
cd ${REPO_ROOT} | ||
|
||
|
||
BUILD_DIR="${REPO_ROOT}/.build" | ||
mkdir -p "${BUILD_DIR}" | ||
|
||
|
||
MANUAL_DIR="${BUILD_DIR}/manual-release" | ||
mkdir -p "${MANUAL_DIR}/operator-system" | ||
|
||
# New process | ||
kustomize build config/installbundle/release-manifests/standard -o ${MANUAL_DIR}/operator-system/configconnector-operator.yaml | ||
echo "Added standard release manifest to ${MANUAL_DIR}/operator-system/configconnector-operator.yaml" | ||
|
||
kustomize build config/installbundle/release-manifests/autopilot -o ${MANUAL_DIR}/operator-system/autopilot-configconnector-operator.yaml | ||
echo "Added autopilot release manifest to ${MANUAL_DIR}/operator-system/autopilot-configconnector-operator.yaml" | ||
|
||
cp -rf operator/config/samples ${MANUAL_DIR}/ | ||
|
||
tar -czvf ${BUILD_DIR}/release-bundle.tar.gz -C ${MANUAL_DIR}/ . | ||
|
||
echo "Generated ${BUILD_DIR}/release-bundle.tar.gz for manual installation " |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we plan to check in these files? Maybe we can have a bot periodically run the kustomize build and check in the final yaml files.