Skip to content

Commit

Permalink
Values alignent (#13)
Browse files Browse the repository at this point in the history
* Align with other values.yaml template

Signed-off-by: Dominique Vernier <[email protected]>

* Add doc for attach

Signed-off-by: Dominique Vernier <[email protected]>
  • Loading branch information
itdove authored Mar 30, 2021
1 parent 03393a2 commit 568f4e1
Show file tree
Hide file tree
Showing 20 changed files with 1,590 additions and 157 deletions.
4 changes: 4 additions & 0 deletions .copyrightignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#file extensions to ignore on top of .gitignore
.copyrightignore
_generated.go
test/functional/resources/hive_v1_clusterdeployment_crd.yaml
78 changes: 78 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
[comment]: # ( Copyright Contributors to the Open Cluster Management project )**Table of Contents**

# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [[email protected]](mailto:[email protected]). All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html.

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq.
37 changes: 18 additions & 19 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,32 @@
[comment]: # ( Copyright Contributors to the Open Cluster Management project )
[comment]: # ( Copyright Contributors to the Open Cluster Management project )**Table of Contents**

- [Contributing guidelines](#contributing-guidelines)
- [Terms](#terms)
- [Certificate of Origin](#certificate-of-origin)
- [Contributing a patch](#contributing-a-patch)
- [Issue and pull request management](#issue-and-pull-request-management)
- [Requirements](#requirements)
- [Develop new commands](#Develop-new-commands)

# Contributing guidelines

## Contributions
## Terms

All contributions to the repository must be submitted under the terms of the [Apache Public License 2.0](https://www.apache.org/licenses/LICENSE-2.0).

## Certificate of Origin

By contributing to this project you agree to the Developer Certificate of
Origin (DCO). This document was created by the Linux Kernel community and is a
simple statement that you, as a contributor, have the legal right to make the
contribution. See the [DCO](DCO) file for details.

## Contributing A Patch

1. Submit an issue describing your proposed change to the repo in question.
2. The [repo owners](OWNERS) will respond to your issue promptly.
3. Fork the desired repo, develop and test your code changes.
4. Submit a pull request.
By contributing to this project, you agree to the Developer Certificate of Origin (DCO). This document was created by the Linux Kernel community and is a simple statement that you, as a contributor, have the legal right to make the contribution. See the [DCO](DCO) file for details.

## Issue and Pull Request Management
## Contributing a patch

Anyone may comment on issues and submit reviews for pull requests. However, in
order to be assigned an issue or pull request, you must be a member of the
[open-cluster-management](https://github.com/open-cluster-management) GitHub organization.
1. Submit an issue describing your proposed change to the repository in question. The repository owners will respond to your issue promptly.
2. Fork the desired repository, then develop and test your code changes.
3. Submit a pull request.

Repo maintainers can assign you an issue or pull request by leaving a
`/assign <your Github ID>` comment on the issue or pull request.
## Issue and pull request management

Anyone can comment on issues and submit reviews for pull requests. In order to be assigned an issue or pull request, you can leave a `/assign <your Github ID>` comment on the issue or pull request.
# Requirements

- Go 1.16
Expand Down
37 changes: 37 additions & 0 deletions DCO
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or

(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or

(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.

(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
101 changes: 101 additions & 0 deletions MISSION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
[comment]: # ( Copyright Contributors to the Open Cluster Management project )**Table of Contents**

## Mission Statement

We seek to form an open community around multicluster and multicloud scenarios for containerized applications. We propose to anchor the initial community around github.com/open-cluster-management and open-cluster-management.io.

We seek to add value to the community by a focused effort around many aspects of how users are deploying and managing Kubernetes clusters today. We seek to engage other parts of the community and both contribute to pre-existing efforts and invite contributors in those communities to cross-collaborate as part of this project.

We are initially interested in the following lifecycles associated with expanding adoption of Kubernetes:

1. Cluster Lifecycle. How are clusters provisioned, upgraded, registered, scaled out or in and decommissioned?
2. Policy & Configuration Lifecycle. How are clusters configured, audited, secured, access controlled, managed for quota or cost?
3. Application Lifecycle. How are containerized or hybrid applications delivered across one or more clusters? How are those applications kept current with ongoing changes?
4. Observability. How does a user understand the health of their cluster fleet? How does a user understand the health of distributed applications? How does a user search available clusters or applications and diagnose problems when they occur?

Our initial goals for the project are to define API and reference implementations for common use cases that we have observed as users grow their adoption of Kubernetes:

- Define API for cluster registration independent of cluster CRUD lifecycle.
- Define API for work distribution across multiple clusters.
- Define API for dynamic placement of content and behavior across multiple clusters.
- Define API for policy definition to ensure desired configuration and security settings are auditable or enforceable.
- Define API for distributed application delivery across many clusters and the ability to deliver ongoing updates.
- Define API to collect cluster and application health metrics and alerts across multiple clusters.

We expect that over time, the project will make sense to contribute to an appropriate foundation for stewardship. In the meantime, we intend to engage and contribute where similar use cases are under active discussion in the community including the Kubernetes SIG-Multicluster and SIG-Policy workgroups, among others.

## Contributor Code of Conduct
The Open Cluster Management project has adopted the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md). The English text of the CNCF Code of Conduct is made available here for reference. Additional [language translations](https://github.com/cncf/foundation/blob/master/code-of-conduct.md) are available.

“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.

We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.
Examples of unacceptable behavior by participants include:
The use of sexualized language or imagery
Personal attacks
Trolling or insulting/derogatory comments
Public or private harassment
Publishing others' private information, such as physical or electronic addresses, without explicit permission
Other unethical or unprofessional conduct.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.
This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.”
Instances of abusive, harassing, or otherwise unacceptable behavior in Open Cluster Management may be reported by contacting [NEED POINT OF CONTACT].” [[Reference](https://github.com/cncf/foundation/blob/master/code-of-conduct.md)]

## Getting Involved

Anyone who is interested in getting involved is welcome to contribute in a number of ways:

Join the recurring meeting forums (see below) to provide input as a stakeholder and help validate proposed use cases.
Suggest enhancements via github.com/open-cluster-management/enhancements for consideration to the community.
Contribute to development via Pull Request for new enhancements or defect fixes.

Suggested API and implementations will be accepted in accordance with the broad use cases outlined above. Our goal is to reserve the Kubernetes API Group open-cluster-management.io for well-reviewed and widely supported features.

## Community Meeting Forum

To ensure opportunities for broad user contributions, a public forum will be hosted to demonstrate new capabilities, solicit feedback and offer a forum for real time Q&A.
Meeting recordings will be posted to a YouTube channel for offline viewing.

- Public Agenda (Link TBD)
- First Monday of the month
- 5-6 PM US Pacific / 8-9 PM US Eastern / 1-2 AM GMT / 8-9 AM (Tuesday) China
- Third Monday of the month
- 8-9 AM US Pacific / 11 AM - 12 PM US Eastern / 4-5 PM GMT / 8-9 PM (Monday) China

## Community Architecture Forum

Technical discussions will also be held in an open forum. The topics for the Community Architecture Forum will cover technical review of APIs and relevant implementation details.
Meeting recordings will be posted to a YouTube channel for offline viewing.


- Public Agenda (Link TBD)
- Second Monday of the month
- 5-6 PM US Pacific / 8-9 PM US Eastern / 1-2 AM GMT / 8-9 AM (Tuesday) China
- Fourth Monday of the month
- 8-9 AM US Pacific / 11 AM -12 PM US Eastern / 4-5 PM GMT / 8-9 PM (Monday) China

## Communication

A public [Google Group](https://groups.google.com/g/open-cluster-management) has been created to facilitate offline discussion outside of Github issues or Pull Requests.

The project team has chosen to defer a new Slack team until we get enough critical mass in the community to warrant joining another Slack team or workspace.

## Governance

* **Committees** The project will initially have a 3-person Bootstrap Steering Committee. The present steering
committee is a bootstrap committee and we want to work towards a future state where there is community representation and community determination of the steering committee members. In that future state, the steering committee size may be expanded to meet the needs of the community.

* **Special Interest Group (SIG)** are persistent open groups that focus on a part of the project.
SIGs must have open and transparent proceedings.
Anyone is welcome to participate and contribute provided they follow the Code of Conduct.

The project has a bootstrap [sig-architecture](sig-architecture) to provide oversight and guidance on API and architectural aspects of the project to ensure a consistent and robust technical foundation for the project. More SIGs are expected to be established with the evolution of the project.

## Public Roadmap




## Security Response

Please see https://github.com/open-cluster-management/community/blob/master/SECURITY.md.
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[comment]: # ( Copyright Contributors to the Open Cluster Management project )
# Security Response

If you've found a security issue that you'd like to disclose confidentially please contact Red Hat's Product Security team.
Details at https://access.redhat.com/security/team/contact
If you've found a security issue that you'd like to disclose confidentially please contact Red Hat's Product Security team.
Details at https://access.redhat.com/security/team/contact
3 changes: 2 additions & 1 deletion build/check-copyright.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
# set -x
TMP_FILE="tmp_file"

ALL_FILES=$(find . -name "*" | grep -v build-harness | grep -v kind_kubeconfig.yaml | grep -v test/functional/tmp | grep -v _generated )
ALL_FILES=$(git ls-files | \
grep -v -f <(sed 's/\([.|]\)/\\\1/g; s/\?/./g ; s/\*/.*/g' .copyrightignore))

COMMUNITY_COPY_HEADER_FILE="$PWD/build/copyright-header.txt"

Expand Down
11 changes: 8 additions & 3 deletions build/run-functional-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@
# Copyright Contributors to the Open Cluster Management project

# set -x
set -e
TEST_DIR=test/functional
TEST_RESULT_DIR=$TEST_DIR/tmp
ERROR_REPORT=""
CLUSTER_NAME=$PROJECT_NAME-functional-test
kind create cluster --name $CLUSTER_NAME
# Configure the kind cluster
cm applier -d $TEST_DIR/resources
export KUBECONFIG=$TEST_DIR/tmp/kind.yaml

rm -rf $TEST_RESULT_DIR
mkdir -p $TEST_RESULT_DIR

kind create cluster --name ${CLUSTER_NAME}
kind get kubeconfig --name ${CLUSTER_NAME} > ${TEST_DIR}/tmp/kind.yaml

# Configure the kind cluster
cm applier -d $TEST_DIR/resources

echo "Test cm create cluster AWS"
cm create cluster --values $TEST_DIR/create/cluster/aws_values.yaml -o $TEST_RESULT_DIR/aws_result.yaml
diff -u $TEST_DIR/create/cluster/aws_result.yaml $TEST_RESULT_DIR/aws_result.yaml
Expand Down
8 changes: 8 additions & 0 deletions docs/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ cm <verb> cluster <options...>
cat values.yaml | cm <verb> cluster
```

The values.yaml have the same format and so if one is used for `create` it can be used for `attach`, `delete`, `detach`.

## Help

```bash
Expand All @@ -29,6 +31,12 @@ cm <verbs> cluster -h
### Attach Cluster

The `attach` verb provides the capability to attach a cluster to a hub.
The `attach` can be done on different ways.
1. Manually, meaning once you ran the `attach` you still have to run an `cm apply` command (provided by the execution of the `attach` command) to install the agent on the managed cluster.
2. Automatically by providing the kubeconfig in the [values.yaml](../pkg/cmd/attach/cluster/scenario/attach/values-template.yaml), then a secret will be created on the hub cluster and the system will use it to install the agent. The secret is deleled if the `attach` failed or succeed and so the credentials are not kept on the hub.
3. Automatically by providing the pair server/token in the [values.yaml](../pkg/cmd/attach/cluster/scenario/attach/values-template.yaml) and again a secret will be created on the hub and the system will use it to install the agent. The secret is deleled if the `attach` failed or succeed and so the credentials are not kept on the hub.
4. Automatically when the cluster was provisionned with hive. If the cluster was provisionned with hive, a clusterdeployemnt custom resource exists which contain a secret to access the remote cluster and thus if you `attach` a hive cluster, you don't have to provide any credential to access the cluster. The system will find out the credentials and attach the cluster.
5. Attaching the hub: by default the hub is attached but if you detached it and want to reattach it you just have to provide a [values.yaml](../pkg/cmd/attach/cluster/scenario/attach/values-template.yaml) with a cluster name `local-cluster`. The system will recognized that name and use the cluster credentials to do the attach.

### Detach Cluster

Expand Down
Loading

0 comments on commit 568f4e1

Please sign in to comment.