Skip to content

Commit

Permalink
Remove master referneces (#751)
Browse files Browse the repository at this point in the history
To make community more welcoming we are removing the master word with
the alternative

Signed-off-by: Quique Llorente <[email protected]>
  • Loading branch information
qinqon authored May 23, 2021
1 parent 250e710 commit c6ac182
Show file tree
Hide file tree
Showing 17 changed files with 45 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- Thanks for sending a pull request!
Before you click the 'Create pull request' make sure that:
- This PR introduces a single feature of fix, just one
- This PR does not leave the master branch broken
- This PR does not leave the main branch broken
- Every commit in this PR has a commit message explaining what do you change,
why and what is the outcome
- If your change introduces a complex concept or a change to user interaction
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The system is implemented as an k8s operator using the
[operator-sdk](https://github.com/operator-framework/operator-sdk) but is
deployed as a DaemonSet instead of Deployment with
[filtering](https://github.com/operator-framework/operator-sdk/blob/master/doc/user/event-filtering.md)
[filtering](https://sdk.operatorframework.io/docs/building-operators/golang/references/event-filtering/)
only events for the DaemonSet pod node.


Expand All @@ -14,7 +14,7 @@ implies following dependency requirements:

| kubernetes-nmstate version | NetworkManager version |
| --- | --- |
| master, `> 0.15.0` | `>= 1.22` |
| main, `> 0.15.0` | `>= 1.22` |
| `<= 0.15.0` | `>= 1.20` |


Expand Down Expand Up @@ -158,7 +158,7 @@ So the step would be:
- Prepare a release calling `make prepare-(patch|minor|major)`
- Edit version/description to set a description and order commits
- Create a PR to review it
- Merge it to master
- Merge it to main
- Wait for Prow to do the release.

The environment variable `GITHUB_TOKEN` is needed to publish at GitHub and it must
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ WHAT ?= ./pkg ./controllers ./api
unit_test_args ?= -r -keepGoing --randomizeAllSpecs --randomizeSuites --race --trace $(UNIT_TEST_ARGS)

export KUBEVIRT_PROVIDER ?= k8s-1.20
export KUBEVIRT_NUM_NODES ?= 2 # 1 master, 1 worker needed for e2e tests
export KUBEVIRT_NUM_NODES ?= 2 # 1 control-plane, 1 worker needed for e2e tests
export KUBEVIRT_NUM_SECONDARY_NICS ?= 2

export E2E_TEST_TIMEOUT ?= 80m
Expand Down
2 changes: 1 addition & 1 deletion api/shared/nodenetworkstate_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// The yaml parser we use here first convert yaml to json and then manage
// the data with the standard golang json package.
//
// [1] https://github.com/nmstate/nmstate/blob/master/libnmstate/schemas/operational-state.yaml
// [1] https://github.com/nmstate/nmstate/blob/base/libnmstate/schemas/operational-state.yaml

package shared

Expand Down
2 changes: 1 addition & 1 deletion api/v1beta1/nmstate_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
// NMStateSpec defines the desired state of NMState
type NMStateSpec struct {
// NodeSelector is an optional selector that will be added to handler DaemonSet manifest
// for both workers and masters (https://github.com/nmstate/kubernetes-nmstate/blob/master/deploy/handler/operator.yaml).
// for both workers and control-plane (https://github.com/nmstate/kubernetes-nmstate/blob/main/deploy/handler/operator.yaml).
// If NodeSelector is specified, the handler will run only on nodes that have each of the indicated key-value pairs
// as labels applied to the node.
// +optional
Expand Down
2 changes: 1 addition & 1 deletion automation/check-patch.e2e-k8s.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ teardown() {
}

main() {
export KUBEVIRT_NUM_NODES=5 # 1 master, 4 workers
export KUBEVIRT_NUM_NODES=5 # 1 control-plane, 4 workers
source automation/check-patch.setup.sh
cd ${TMP_PROJECT_PATH}

Expand Down
2 changes: 1 addition & 1 deletion automation/check-patch.e2e-operator-k8s.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ teardown() {
}

main() {
export KUBEVIRT_NUM_NODES=3 # 1 master, 2 workers
export KUBEVIRT_NUM_NODES=3 # 1 control-plane, 2 workers
source automation/check-patch.setup.sh
cd ${TMP_PROJECT_PATH}

Expand Down
8 changes: 4 additions & 4 deletions bundle.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ FROM scratch
LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1
LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
LABEL operators.operatorframework.io.bundle.package.v1=kubernetes-nmstate-operator
LABEL operators.operatorframework.io.bundle.package.v1=kubernetes-nmstate
LABEL operators.operatorframework.io.bundle.channels.v1=alpha
LABEL operators.operatorframework.io.bundle.channel.default.v1=alpha
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.0.0
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-unknown
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v2

LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/
LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1
COPY bundle/manifests /manifests/
COPY bundle/metadata /metadata/
17 changes: 13 additions & 4 deletions bundle/manifests/nmstate.io_nmstates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.0
controller-gen.kubebuilder.io/version: v0.4.1
creationTimestamp: null
name: nmstates.nmstate.io
spec:
Expand All @@ -20,10 +20,14 @@ spec:
description: NMState is the Schema for the nmstates API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
Expand All @@ -33,7 +37,12 @@ spec:
nodeSelector:
additionalProperties:
type: string
description: NodeSelector is an optional selector that will be added to handler DaemonSet manifest for both workers and masters (https://github.com/nmstate/kubernetes-nmstate/blob/master/deploy/handler/operator.yaml). If NodeSelector is specified, the handler will run only on nodes that have each of the indicated key-value pairs as labels applied to the node.
description: NodeSelector is an optional selector that will be added
to handler DaemonSet manifest for both workers and control-plane
(https://github.com/nmstate/kubernetes-nmstate/blob/main/deploy/handler/operator.yaml).
If NodeSelector is specified, the handler will run only on nodes
that have each of the indicated key-value pairs as labels applied
to the node.
type: object
type: object
status:
Expand Down
10 changes: 7 additions & 3 deletions bundle/metadata/annotations.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
annotations:
operators.operatorframework.io.bundle.channel.default.v1: "alpha"
operators.operatorframework.io.bundle.channels.v1: "alpha"
operators.operatorframework.io.bundle.channels.v1: alpha
operators.operatorframework.io.bundle.manifests.v1: manifests/
operators.operatorframework.io.bundle.mediatype.v1: registry+v1
operators.operatorframework.io.bundle.metadata.v1: metadata/
operators.operatorframework.io.bundle.package.v1: kubernetes-nmstate-operator
operators.operatorframework.io.bundle.package.v1: kubernetes-nmstate
operators.operatorframework.io.metrics.builder: operator-sdk-unknown
operators.operatorframework.io.metrics.mediatype.v1: metrics+v1
operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v2
operators.operatorframework.io.test.config.v1: tests/scorecard/
operators.operatorframework.io.test.mediatype.v1: scorecard+v1
3 changes: 2 additions & 1 deletion deploy/crds/nmstate.io_nmstates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ spec:
additionalProperties:
type: string
description: NodeSelector is an optional selector that will be added
to handler DaemonSet manifest for both workers and masters (https://github.com/nmstate/kubernetes-nmstate/blob/master/deploy/handler/operator.yaml).
to handler DaemonSet manifest for both workers and control-plane
(https://github.com/nmstate/kubernetes-nmstate/blob/main/deploy/handler/operator.yaml).
If NodeSelector is specified, the handler will run only on nodes
that have each of the indicated key-value pairs as labels applied
to the node.
Expand Down
4 changes: 2 additions & 2 deletions docs/deployment/local-cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ the [deployment on arbitrary cluster guide]({{ "deployment/arbitrary-cluster.htm

Start your local cluster. If you want to use OpenShift instead of Kubernetes or
a different amount of nodes, check the
[development guide]({{ site.github.repository_url }}/blob/master/CONTRIBUTING.md#local-cluster).
[development guide]({{ site.github.repository_url }}/blob/main/CONTRIBUTING.md#local-cluster).

Start the local cluster

Expand Down Expand Up @@ -57,5 +57,5 @@ cluster/kubectl.sh proxy --port=8080 --disable-filter=true &
```

You can stop here and play with the cluster on your own or continue with the
other [user guides]({{ site.github.repository_url }}/blob/master/README.md#deployment-and-usage) that will guide you
other [user guides]({{ site.github.repository_url }}/blob/main/README.md#deployment-and-usage) that will guide you
through requesting of node interfaces and their configuration.
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
The only external dependency is NetworkManager running on nodes. See more
details in
[Compatibility documentation]({{ site.github.repository_url }}/blob/master/CONTRIBUTING.md).
[Compatibility documentation]({{ site.github.repository_url }}/blob/main/CONTRIBUTING.md).
Some [examples](examples.html) can be used as reference on how to configure various
configuration options
Expand All @@ -58,4 +58,4 @@ what this project is addressing.
# Development and Contributing
Contributions are welcome! Find details about the project's design and
development workflow in the [developer guide]({{ site.github.repository_url }}/blob/master/CONTRIBUTING.md).
development workflow in the [developer guide]({{ site.github.repository_url }}/blob/main/CONTRIBUTING.md).
2 changes: 1 addition & 1 deletion pkg/policyconditions/conditions.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func Update(cli client.Client, policyKey types.NamespacedName) error {
}

// Count only nodes that runs nmstate handler and match the policy
// nodeSelector, could be that users don't want to run knmstate at master for example
// nodeSelector, could be that users don't want to run knmstate at control-plane for example
// so they don't want to change net config there.
nmstateMatchingNodes, err := node.NodesRunningNmstate(cli, policy.Spec.NodeSelector)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/handler/bonding_default_interface_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ var _ = Describe("NodeNetworkConfigurationPolicy bonding default interface", fun
for _, node := range nodes {
verifyBondIsUpWithPrimaryNicIp(node, expectedBond, addressByNode[node])
}
// Restart only first node that it master if other node is restarted it will stuck in NotReady state
// Restart only first node that it's a control-plane if other node is restarted it will stuck in NotReady state
nodeToReboot := nodes[0]
By(fmt.Sprintf("Reboot node %s and verify that bond still has ip of primary nic", nodeToReboot))
err := restartNode(nodeToReboot)
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/handler/nns_update_timestamp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ var _ = Describe("[nns] NNS LastSuccessfulUpdateTime", func() {
})
Context("when network configuration is changed by a NNCP", func() {
BeforeEach(func() {
// We want to test all the NNS so we apply policies to masters and workers
// We want to test all the NNS so we apply policies to control-plane and workers
setDesiredStateWithPolicyWithoutNodeSelector(TestPolicy, linuxBrUp(bridge1))
waitForAvailableTestPolicy()
})
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/handler/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func interfacesName(interfaces []interface{}) []string {
var names []string
for _, iface := range interfaces {
name, hasName := iface.(map[string]interface{})["name"]
Expect(hasName).To(BeTrue(), "should have name field in the interfaces, https://github.com/nmstate/nmstate/blob/master/libnmstate/schemas/operational-state.yaml")
Expect(hasName).To(BeTrue(), "should have name field in the interfaces, https://github.com/nmstate/nmstate/blob/base/libnmstate/schemas/operational-state.yaml")
names = append(names, name.(string))
}
return names
Expand All @@ -54,7 +54,7 @@ func interfaceByName(interfaces []interface{}, searchedName string) map[string]i
var dummy map[string]interface{}
for _, iface := range interfaces {
name, hasName := iface.(map[string]interface{})["name"]
Expect(hasName).To(BeTrue(), "should have name field in the interfaces, https://github.com/nmstate/nmstate/blob/master/libnmstate/schemas/operational-state.yaml")
Expect(hasName).To(BeTrue(), "should have name field in the interfaces, https://github.com/nmstate/nmstate/blob/base/libnmstate/schemas/operational-state.yaml")
if name == searchedName {
return iface.(map[string]interface{})
}
Expand Down Expand Up @@ -494,7 +494,7 @@ func nodeInterfacesState(node string, exclude []string) []byte {
ifacesState := make(map[string]string)
for _, iface := range interfaces {
name, hasName := iface.(map[string]interface{})["name"]
Expect(hasName).To(BeTrue(), "should have name field in the interfaces, https://github.com/nmstate/nmstate/blob/master/libnmstate/schemas/operational-state.yaml")
Expect(hasName).To(BeTrue(), "should have name field in the interfaces, https://github.com/nmstate/nmstate/blob/base/libnmstate/schemas/operational-state.yaml")
if ifaceInSlice(name.(string), exclude) {
continue
}
Expand Down

0 comments on commit c6ac182

Please sign in to comment.