Skip to content
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

fix: reduce warnings caused by woke scan results #7558

Merged
merged 3 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .wokeignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
go.mod
go.sum
vendor
config/dummy.go
docs/pipeline-api.md
examples/**/**/*.yaml
pkg/apis/pipeline/**/*.go
pkg/apis/pipeline/**/openapi_generated.go
pkg/apis/pipeline/**/swagger.json
pkg/resolution/resolver/git/*.go
test/custom-task-ctrls/wait-task-beta/config/controller.yaml
test/markdown-lint-config.rc
vendor
.wokeignore

2 changes: 1 addition & 1 deletion docs/api-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ A `ParamValue` may be a string, a list of string, or a map of string to string.
**NB:** All other [EnvVar](https://godoc.org/k8s.io/api/core/v1#EnvVar) types inherited from [core.v1/EnvVar](https://godoc.org/k8s.io/api/core/v1#EnvVar) and supported by the Kubernetes implementation (e.g., `valueFrom`) are **OPTIONAL** for the purposes of this spec.

## Status Signalling

<!-- wokeignore:rule=master -->
The Tekton Pipelines API uses the [Kubernetes Conditions convention](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties) to communicate status and errors to the user.

`TaskRun`'s `status` field MUST have a `conditions` field, which must be a list of `Condition` objects of the following form:
Expand Down
1 change: 1 addition & 0 deletions docs/developers/controller-logic.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Before learning about how Tekton works, it's useful to take some time to understand what a Kubernetes object is.
Please see [Understanding Kubernetes objects](https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/)
for an overview of working with objects.
<!-- wokeignore:rule=master -->
Kubernetes [API conventions docs](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#types-kinds)
are another useful resource for understanding object terminology.

Expand Down
3 changes: 2 additions & 1 deletion docs/developers/local-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Complete these prerequisites to run Tekton locally using Minikube:
minikube start --memory 6144 --cpus 2
```
- Point your shell to minikube's docker-daemon by running `eval $(minikube -p minikube docker-env)`
<!-- wokeignore:rule=master -->
- Set up a [registry on minikube](https://github.com/kubernetes/minikube/tree/master/deploy/addons/registry-aliases) by running `minikube addons enable registry` and `minikube addons enable registry-aliases`

### Reconfigure logging
Expand Down Expand Up @@ -118,8 +119,8 @@ EOF
# connect the registry to the cluster network
# (the network may already be connected)
docker network connect "kind" "${reg_name}" || true

# Document the local registry
# <!-- wokeignore:rule=master -->
# https://github.com/kubernetes/enhancements/tree/master/keps/sig-cluster-lifecycle/generic/1755-communicating-a-local-registry
cat <<EOF | kubectl apply -f -
apiVersion: v1
Expand Down
2 changes: 1 addition & 1 deletion docs/enabling-ha.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ metadata:
spec:
minReplicas: 1
```

<!-- wokeignore:rule=master -->
By default, the Webhook deployment is _not_ configured to block a [Cluster Autoscaler](https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler) from scaling down the node that's running the only replica of the deployment using the `cluster-autoscaler.kubernetes.io/safe-to-evict` annotation.
This means that during node drains, the Webhook might be unavailable temporarily, during which time Tekton resources can't be created, updated or deleted.
To avoid this, you can add the `safe-to-evict` annotation set to `false` to block node drains during autoscaling, or, better yet, configure multiple replicas of the Webhook deployment.
Expand Down
2 changes: 1 addition & 1 deletion docs/pipelineruns.md
Original file line number Diff line number Diff line change
Expand Up @@ -1429,8 +1429,8 @@ If you set the timeout to 0, the `PipelineRun` fails immediately upon encounteri
### The `status` field

Your `PipelineRun`'s `status` field can contain the following fields:

- Required:
<!-- wokeignore:rule=master -->
- `status` - Most relevant, `status.conditions`, which contains the latest observations of the `PipelineRun`'s state. [See here](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties) for information on typical status properties.
- `startTime` - The time at which the `PipelineRun` began executing, in [RFC3339](https://tools.ietf.org/html/rfc3339) format.
- `completionTime` - The time at which the `PipelineRun` finished executing, in [RFC3339](https://tools.ietf.org/html/rfc3339) format.
Expand Down
2 changes: 1 addition & 1 deletion docs/pipelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -975,7 +975,7 @@ Whole `Array` and `Object` replacements are not supported yet. The following usa
- cel: "'foo' in '$(params.array_params[*]']"
- cel: "'foo' in '$(params.object_params[*]']"
```

<!-- wokeignore:rule=master -->
In addition to the cases listed above, you can craft any valid CEL expression as defined by the [cel-spec language definition](https://github.com/google/cel-spec/blob/master/doc/langdef.md)


Expand Down
1 change: 1 addition & 0 deletions docs/taskruns.md
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,7 @@ The `status` field defines the observed state of `TaskRun`
### The `status` field
- Required:
- `status` - The most relevant information about the TaskRun's state. This field includes:
<!-- wokeignore:rule=master -->
- `status.conditions`, which contains the latest observations of the `TaskRun`'s state. [See here](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties) for information on typical status properties.
- `podName` - Name of the pod containing the containers responsible for executing this `task`'s `step`s.
- `startTime` - The time at which the `TaskRun` began executing, conforms to [RFC3339](https://tools.ietf.org/html/rfc3339) format.
Expand Down
1 change: 1 addition & 0 deletions docs/tekton-bundle-contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ annotations on a given layer must be unique among all layers of that image. In p

Each layer must be compressed and stored with a supported OCI MIME type *except* for `+zstd` types. For list of the
supported types see
<!-- wokeignore:rule=master -->
[the official spec](https://github.com/opencontainers/image-spec/blob/master/layer.md#zstd-media-types).

Furthermore, each layer must contain a YAML or JSON representation of the underlying resource. If the resource is
Expand Down
3 changes: 2 additions & 1 deletion docs/tekton-controller-performance-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Configure ThreadsPerController, QPS and Burst
This document will show us how to configure [tekton-pipeline-controller](./../config/controller.yaml)'s performance. In general, there are mainly have three parameters will impact the performance of tekton controller, they are `ThreadsPerController`, `QPS` and `Burst`.

- `ThreadsPerController`: Threads (goroutines) to create per controller. It's the number of threads to use when processing the controller's work queue.

<!-- wokeignore:rule=master -->
- `QPS`: Queries per Second. Maximum QPS to the master from this client.

- `Burst`: Maximum burst for throttle.
Expand Down Expand Up @@ -50,4 +50,5 @@ spec:
Now, the ThreadsPerController, QPS and Burst have been changed to be `32`, `50` and `50`.

**Note**:
<!-- wokeignore:rule=master -->
Although in above example, you set QPS and Burst to be `50` and `50`. However, the actual values of them are [multiplied by `2`](https://github.com/pierretasci/pipeline/blob/master/cmd/controller/main.go#L83-L84), so the actual QPS and Burst is `100` and `100`.
1 change: 1 addition & 0 deletions docs/trusted-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ kubectl patch configmap feature-flags -n tekton-pipelines -p='{"data":{"trusted-
```

#### TaskRun and PipelineRun status update
<!-- wokeignore:rule=master -->
Trusted resources will update the taskrun's [condition](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties) to indicate if it passes verification or not.

The following tables illustrate how the conditions are impacted by feature flag and verification result. Note that if not `true` or `false` means this case doesn't update the corresponding condition.
Expand Down
2 changes: 1 addition & 1 deletion docs/workspaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ workspaces:
The `csi` field references a [`csi` volume](https://kubernetes.io/docs/concepts/storage/volumes/#csi).
`csi` workspaces are a [beta feature](./additional-configs.md#beta-features).
Using a `csi` volume has the following limitations:

<!-- wokeignore:rule=master -->
- `csi` volume sources require a volume driver to use, which must correspond to the value by the CSI driver as defined in the [CSI spec](https://github.com/container-storage-interface/spec/blob/master/spec.md#getplugininfo).

```yaml
Expand Down