Skip to content

Commit

Permalink
Automated merge
Browse files Browse the repository at this point in the history
* upstream/main: (27 commits)
  Implement e2e dualStack data plane tests (istio-ecosystem#383)
  Fix error handling in deployBookinfo (istio-ecosystem#384)
  Adding default value for IP_FAMILY (istio-ecosystem#378)
  Update/Fix Istioctl links and docs (istio-ecosystem#349)
  Fix broken url for sample gateway (istio-ecosystem#377)
  Implement e2e dualStack control plane tests (istio-ecosystem#373)
  Improve pull request template (istio-ecosystem#376)
  Add ability to specify resources in helm chart (istio-ecosystem#375)
  Update dependencies and fix transform (istio-ecosystem#374)
  E2E kubectl util refactor (istio-ecosystem#368)
  Update helm chart README (istio-ecosystem#370)
  Add pull request template (istio-ecosystem#366)
  Fix formatting in the charts readme page (istio-ecosystem#364)
  Add CODE-OF-CONDUCT to the project (istio-ecosystem#362)
  Update test labels in the wayofwork documentation (istio-ecosystem#359)
  Automatically adjust default release channel (istio-ecosystem#353)
  Adding wait after olm install in olm test setup (istio-ecosystem#357)
  Adding E2e multicluster test (istio-ecosystem#342)
  Use Kubernetes defaults for imagePullPolicy (istio-ecosystem#352)
  Add External Controlplane to user docs (istio-ecosystem#335)
  ...
  • Loading branch information
openshift-service-mesh-bot committed Oct 7, 2024
2 parents 64a14b8 + e4ffa47 commit 89889f0
Show file tree
Hide file tree
Showing 157 changed files with 4,323 additions and 1,025 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "istio build-tools",
"image": "gcr.io/istio-testing/build-tools:master-0aa2afb4bac9a4fd1bfe50a929c077a643066b3a",
"image": "gcr.io/istio-testing/build-tools:master-8584ca511549c1cd96d9cb8b900297de83f4cb64",
"privileged": true,
"remoteEnv": {
"USE_GKE_GCLOUD_AUTH_PLUGIN": "True",
Expand Down
40 changes: 40 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!-- Thanks for sending a pull request! Here are some tips for you:
1. If this is your first time, please read our contributor guidelines: https://github.com/istio-ecosystem/sail-operator/blob/main/CONTRIBUTING.md
2. Discuss your changes before you start working on them. You can open a new issue in the [Sail Operator GitHub repository](https://github.com/istio-ecosystem/sail-operator/issues) or start a discussion in the [Sail Operator Discussion](https://github.com/istio-ecosystem/sail-operator/discussions). By this way, you can get feedback from the community and ensure that your changes are aligned with the project goals.
3. If the PR is unfinished, make is as a draft.
-->

#### What type of PR is this?
<!--
In order to minimize the time taken to categorize your PR, add a label accoutring to the PR type defined above.
Please, use the following labels, according to the PR type:
* Enhancement / New Feature - enhancement
* Bug Fix - bug
* Refactor - cleanup/refactor
* Optimization - enhancement
* Test - test-e2e
* Documentation Update - documentation
-->

- [ ] Enhancement / New Feature
- [ ] Bug Fix
- [ ] Refactor
- [ ] Optimization
- [ ] Test
- [ ] Documentation Update

#### What this PR does / why we need it:


#### Which issue(s) this PR fixes:
<!--
*Automatically closes linked issue when PR is merged.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
Add related issue or PR if exists.
-->
Fixes #

Related Issue/PR #

#### Additional information:
89 changes: 89 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Release workflow

on:
workflow_dispatch:
inputs:
release_version:
description: "Release version"
required: true
bundle_channels:
description: "Bundle channels"
required: true
default: dev-0.2
is_draft_release:
description: "Draft release"
type: boolean
required: false
default: true
is_pre_release:
description: "Pre-release"
type: boolean
required: false
default: false

run-name: Release ${{ inputs.release_version }}

env:
GIT_USER: ${{ secrets.GIT_USER }}
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
VERSION: ${{ inputs.release_version }}

jobs:
release:
runs-on: ubuntu-latest

steps:
- name: Login to quay.io
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USER }}
password: ${{ secrets.QUAY_PWD }}

- uses: actions/checkout@v4

- name: Build and push operator image
run: |
make docker-buildx \
-e TAG=$VERSION
- name: Generate bundle metadata
run: |
make bundle \
-e CHANNELS=$CHANNELS
env:
CHANNELS: ${{ inputs.bundle_channels }}

- name: Publish bundle in operatorhub.io
run: |
make bundle-publish \
-e GIT_CONFIG_USER_NAME="$GIT_CONFIG_USER_NAME" \
-e GIT_CONFIG_USER_EMAIL="$GIT_CONFIG_USER_EMAIL" \
-e OPERATOR_VERSION=$VERSION \
-e OPERATOR_HUB=community-operators \
-e OWNER=k8s-operatorhub \
-e FORK=maistra
env:
GIT_CONFIG_USER_NAME: "${{ github.actor }}"
GIT_CONFIG_USER_EMAIL: "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"

- name: Publish bundle in OpenShift OperatorHub
run: |
make bundle-publish \
-e GIT_CONFIG_USER_NAME="$GIT_CONFIG_USER_NAME" \
-e GIT_CONFIG_USER_EMAIL="$GIT_CONFIG_USER_EMAIL" \
-e OPERATOR_VERSION=$VERSION \
-e OWNER=redhat-openshift-ecosystem \
-e FORK=maistra
env:
GIT_CONFIG_USER_NAME: "${{ github.actor }}"
GIT_CONFIG_USER_EMAIL: "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"

- name: Create GitHub release
run: |
make create-gh-release \
-e GH_PRE_RELEASE=$GH_PRE_RELEASE \
-e GH_RELEASE_DRAFT=$GH_RELEASE_DRAFT
env:
GH_PRE_RELEASE: ${{ github.event.inputs.is_pre_release == 'true' }}
GH_RELEASE_DRAFT: ${{ github.event.inputs.is_draft_release == 'true' }}
7 changes: 7 additions & 0 deletions CODE-OF-CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Sail Operator Community Code of Conduct

As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.

All members of the Sail Operator community must abide by the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/main/code-of-conduct.md).
Only by respecting each other can we develop a productive, collaborative community.

14 changes: 2 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,15 @@ If you want to contribute to the Sail Operator project, you can follow some rule
- Discuss your changes before you start working on them. You can open a new issue in the [Sail Operator GitHub repository](https://github.com/istio-ecosystem/sail-operator/issues) or start a discussion in the [Sail Operator Discussion](https://github.com/istio-ecosystem/sail-operator/discussions). By this way, you can get feedback from the community and ensure that your changes are aligned with the project goals.
- Use of Labels: We use labels in the issues to help us track the progress of the issues. You can use the labels to help you understand the status of the issue and what is needed to move forward. Those labels are:
- `backport/backport-handled`: Use this label to indicate that the issue has been backported to the appropriate branches.
- `testing`: Use this label to indicate that the issue is related to testing. Can be used in combination with other labels to mark the proper testing type, for example: `testing/e2e`, `testing/unit`, `testing/integration`.
- `test`: Use this label to indicate that the issue is related to test or add `test-needed` when a issue needs a test to be added related. Can be used in combination with other labels to mark the proper test type, for example: `test-e2e`, `test-unit`, `test-integration`.
- `good first issue`: Use this label to indicate that the issue is a good first issue for new contributors.
- `help wanted`: Use this label to indicate that the issue needs help from the community.
- `enhancement`: Use this label to indicate that the issue is an enhancement related to a new feature or improvement.
- Pull Requests: When you open a pull request, you can follow this template to help you provide the necessary information to the maintainers:
- **What type of PR is this?**
- **What this PR does / why we need it:**
- **Which issue(s) this PR fixes:** (Mark with Fixes #12345, with this the issue will be autoclosed when the PR is merged)
- **Special notes for your reviewer:**
- **Does this PR introduce a user-facing change?**
- **Additional documentation:**
- **Does this PR introduce a breaking change?**
- **Other information:**
- Labels: You can use the labels to help you track the status of the PR. The labels are the same as the issue labels. Additionally, you can use the `cleanup/refactor` to indicate that the PR is a cleanup or refactor of the codebase. Having the label just helps with filtering pull requests. It also is a hint that this work does not need an entry in the changelog

## Community meetings

This is not defined yet. We are working on defining the community meetings and how the community can participate in them. We will update this section once we have more information.

## Security Issues

If you find a security issue in the Sail Operator project, please refer to the [Security Policy](https://github.com/istio-ecosystem/sail-operator/security/policy) for more information on how to report security issues. Please do not report security issues in the public GitHub repository.
If you find a security issue in the Sail Operator project, please refer to the [Security Policy](https://github.com/istio-ecosystem/sail-operator/security/policy) for more information on how to report security issues. Please do not report security issues in the public GitHub repository.
42 changes: 37 additions & 5 deletions Makefile.core.mk
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,12 @@ GINKGO_FLAGS := $(if $(VERBOSE),-v) $(if $(CI),--no-color)
# To re-generate a bundle for other specific channels without changing the standard setup, you can:
# - use the CHANNELS as arg of the bundle target (e.g make bundle CHANNELS=candidate,fast,stable)
# - use environment variables to overwrite this value (e.g export CHANNELS="candidate,fast,stable")
CHANNELS ?= ${MINOR_VERSION}
CHANNEL_PREFIX := dev
ifneq (,$(findstring release-,$(shell git rev-parse --abbrev-ref HEAD)))
CHANNEL_PREFIX = stable
endif

CHANNELS ?= $(CHANNEL_PREFIX)-$(MINOR_VERSION)
ifneq ($(origin CHANNELS), undefined)
BUNDLE_CHANNELS = --channels=\"$(CHANNELS)\"
endif
Expand Down Expand Up @@ -165,8 +170,8 @@ test.e2e.ocp: ## Run the end-to-end tests against an existing OCP cluster.
GINKGO_FLAGS="$(GINKGO_FLAGS)" ${SOURCE_DIR}/tests/e2e/integ-suite-ocp.sh

.PHONY: test.e2e.kind
test.e2e.kind: ## Deploy a KinD cluster and run the end-to-end tests against it.
GINKGO_FLAGS="$(GINKGO_FLAGS)" ${SOURCE_DIR}/tests/e2e/integ-suite-kind.sh
test.e2e.kind: istioctl ## Deploy a KinD cluster and run the end-to-end tests against it.
GINKGO_FLAGS="$(GINKGO_FLAGS)" ISTIOCTL="$(ISTIOCTL)" ${SOURCE_DIR}/tests/e2e/integ-suite-kind.sh

.PHONY: test.e2e.describe
test.e2e.describe: ## Runs ginkgo outline -format indent over the e2e test to show in BDD style the steps and test structure
Expand Down Expand Up @@ -381,7 +386,7 @@ gen-charts: ## Pull charts from istio repository.
gen: gen-all-except-bundle bundle ## Generate everything.

.PHONY: gen-all-except-bundle
gen-all-except-bundle: operator-name operator-chart controller-gen gen-api gen-charts gen-manifests gen-code gen-api-docs
gen-all-except-bundle: operator-name operator-chart controller-gen gen-api gen-charts gen-manifests gen-code gen-api-docs github-workflow

.PHONY: gen-check
gen-check: gen restore-manifest-dates check-clean-repo ## Verify that changes in generated resources have been checked in.
Expand Down Expand Up @@ -425,6 +430,9 @@ operator-chart:
sed -i -e "s|^\(image: \).*$$|\1${IMAGE}|g" \
-e "s/^\( version: \).*$$/\1${VERSION}/g" chart/values.yaml

github-workflow:
sed -i -e '1,/default:/ s/^\(.*default:\).*$$/\1 ${CHANNELS}/' .github/workflows/release.yaml

.PHONY: update-istio
update-istio: ## Update the Istio commit hash in the 'latest' entry in versions.yaml to the latest commit in the branch.
@hack/update-istio.sh
Expand All @@ -450,13 +458,15 @@ CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen
ENVTEST ?= $(LOCALBIN)/setup-envtest
GITLEAKS ?= $(LOCALBIN)/gitleaks
OPM ?= $(LOCALBIN)/opm
ISTIOCTL ?= $(LOCALBIN)/istioctl

## Tool Versions
OPERATOR_SDK_VERSION ?= v1.36.1
HELM_VERSION ?= v3.15.3
CONTROLLER_TOOLS_VERSION ?= v0.16.0
OPM_VERSION ?= v1.45.0
GITLEAKS_VERSION ?= v8.18.4
ISTIOCTL_VERSION ?= 1.23.0

# GENERATE_RELATED_IMAGES defines whether `spec.relatedImages` is going to be generated or not
# To disable set flag to false
Expand All @@ -483,6 +493,28 @@ $(OPERATOR_SDK): $(LOCALBIN)
curl -sSLfo $(LOCALBIN)/operator-sdk https://github.com/operator-framework/operator-sdk/releases/download/$(OPERATOR_SDK_VERSION)/operator-sdk_$(OS)_$(ARCH) && \
chmod +x $(LOCALBIN)/operator-sdk;

.PHONY: istioctl $(ISTIOCTL)
istioctl: $(ISTIOCTL) ## Download istioctl to bin directory.
istioctl: TARGET_OS=$(shell go env GOOS)
istioctl: TARGET_ARCH=$(shell go env GOARCH)
$(ISTIOCTL): $(LOCALBIN)
@test -s $(LOCALBIN)/istioctl || { \
OSEXT=$(if $(filter $(TARGET_OS),Darwin),osx,linux); \
URL="https://github.com/istio/istio/releases/download/$(ISTIOCTL_VERSION)/istioctl-$(ISTIOCTL_VERSION)-$$OSEXT-$(TARGET_ARCH).tar.gz"; \
echo "Fetching istioctl from $$URL"; \
curl -fsL $$URL -o /tmp/istioctl.tar.gz || { \
echo "Download failed! Please check the URL and ISTIO_VERSION."; \
exit 1; \
}; \
tar -xzf /tmp/istioctl.tar.gz -C /tmp || { \
echo "Extraction failed!"; \
exit 1; \
}; \
mv /tmp/istioctl $(LOCALBIN)/istioctl; \
rm -f /tmp/istioctl.tar.gz; \
echo "istioctl has been downloaded and placed in $(LOCALBIN)"; \
}

.PHONY: controller-gen
controller-gen: $(LOCALBIN) ## Download controller-gen to bin directory. If wrong version is installed, it will be overwritten.
@test -s $(LOCALBIN)/controller-gen && $(LOCALBIN)/controller-gen --version | grep -q $(CONTROLLER_TOOLS_VERSION) || \
Expand Down Expand Up @@ -624,7 +656,7 @@ git-hook: gitleaks ## Installs gitleaks as a git pre-commit hook.
chmod +x .git/hooks/pre-commit; \
fi

.SILENT: helm $(HELM) $(LOCALBIN) deploy-yaml gen-api operator-name operator-chart
.SILENT: helm $(HELM) $(LOCALBIN) deploy-yaml gen-api operator-name operator-chart github-workflow

COMMON_IMPORTS ?= lint-all lint-scripts lint-copyright-banner lint-go lint-yaml lint-helm format-go tidy-go check-clean-repo update-common
.PHONY: $(COMMON_IMPORTS)
Expand Down
6 changes: 5 additions & 1 deletion api/v1alpha1/istio_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ type IstioStatus struct {
// Reports the current state of the object.
State IstioConditionReason `json:"state,omitempty"`

// The name of the active revision.
ActiveRevisionName string `json:"activeRevisionName,omitempty"`

// Reports information about the underlying IstioRevisions.
Revisions RevisionSummary `json:"revisions,omitempty"`
}
Expand Down Expand Up @@ -238,7 +241,8 @@ const (
// +kubebuilder:printcolumn:name="Revisions",type="string",JSONPath=".status.revisions.total",description="Total number of IstioRevision objects currently associated with this object."
// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.revisions.ready",description="Number of revisions that are ready."
// +kubebuilder:printcolumn:name="In use",type="string",JSONPath=".status.revisions.inUse",description="Number of revisions that are currently being used by workloads."
// +kubebuilder:printcolumn:name="Active Revision",type="string",JSONPath=".status.state",description="The current state of the active revision."
// +kubebuilder:printcolumn:name="Active Revision",type="string",JSONPath=".status.activeRevisionName",description="The name of the currently active revision."
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.state",description="The current state of the active revision."
// +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.version",description="The version of the control plane installation."
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="The age of the object"

Expand Down
6 changes: 5 additions & 1 deletion api/v1alpha1/remoteistio_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ type RemoteIstioStatus struct {
// Reports the current state of the object.
State RemoteIstioConditionReason `json:"state,omitempty"`

// The name of the active revision.
ActiveRevisionName string `json:"activeRevisionName,omitempty"`

// Reports information about the underlying IstioRevisions.
Revisions RevisionSummary `json:"revisions,omitempty"`
}
Expand Down Expand Up @@ -183,7 +186,8 @@ const (
// +kubebuilder:printcolumn:name="Revisions",type="string",JSONPath=".status.revisions.total",description="Total number of IstioRevision objects currently associated with this object."
// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.revisions.ready",description="Number of revisions that are ready."
// +kubebuilder:printcolumn:name="In use",type="string",JSONPath=".status.revisions.inUse",description="Number of revisions that are currently being used by workloads."
// +kubebuilder:printcolumn:name="Active Revision",type="string",JSONPath=".status.state",description="The current state of the active revision."
// +kubebuilder:printcolumn:name="Active Revision",type="string",JSONPath=".status.activeRevisionName",description="The name of the currently active revision."
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.state",description="The current state of the active revision."
// +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.version",description="The version of the control plane installation."
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="The age of the object"

Expand Down
Loading

0 comments on commit 89889f0

Please sign in to comment.