Skip to content

Commit

Permalink
Fix sanity checks and missing headers
Browse files Browse the repository at this point in the history
Fix all sanity check linters
Add all missing license headers
  • Loading branch information
qu1queee committed Feb 16, 2021
1 parent 47234e2 commit cf042ae
Show file tree
Hide file tree
Showing 16 changed files with 58 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
Copyright The Shipwright Contributors
SPDX-License-Identifier: Apache-2.0
-->
# Changes

<!-- 🎉🎉🎉 Thank you for the PR!!! 🎉🎉🎉 -->
Expand Down
5 changes: 5 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
Copyright The Shipwright Contributors
SPDX-License-Identifier: Apache-2.0
-->
# Shipwright Security and Disclosure Information

Shipwright encourages all users and contributors to report potential security vulnerabilities to the project maintainers.
Expand Down
2 changes: 1 addition & 1 deletion cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func main() {
buildMetrics.InitPrometheus(buildCfg)

// Add optionally configured extra handlers to metrics endpoint
for path, handler := range buildMetrics.MetricsExtraHandlers() {
for path, handler := range buildMetrics.ExtraHandlers() {
ctxlog.Info(ctx, "Adding metrics extra handler path", "path", path)
if err := mgr.AddMetricsExtraHandler(path, handler); err != nil {
ctxlog.Error(ctx, err, "")
Expand Down
4 changes: 2 additions & 2 deletions docs/proposals/dedicated-shipwright-operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Deleting the `ShipwrightBuild` instance should remove the associated deployment
However, the Build API CRDs will remain on the cluster, as these will be managed by OLM.

At present, OLM does not delete CRDs and CRD instances if the associated operator is removed.
This is by design to ensure user data is not accidently deleted - see [operator-framework/operator-lifecycle-manager#1326](https://github.com/operator-framework/operator-lifecycle-manager/issues/1326).
This is by design to ensure user data is not accidentally deleted - see [operator-framework/operator-lifecycle-manager#1326](https://github.com/operator-framework/operator-lifecycle-manager/issues/1326).

#### Installed Custom Resource Definitions

Expand All @@ -161,7 +161,7 @@ This would be useful if Project Shipwright produces additional components and cl
**Risk**: Manifests uses to deploy Shipwright Builds in the `shipwright-io/operator` are not synchronized with content in `shipwright-io/build`.

*Mitigation*: The operator's CI should include a test suite that runs the e2e tests in `shipwright-io/build`.
Project maintainers should also ensure that deployment changes to `shipwright-io/build` carry accross to the operator.
Project maintainers should also ensure that deployment changes to `shipwright-io/build` carry across to the operator.

**Risk**: Operator will require permissions cluster admins will reject (ex - modify CRDs)

Expand Down
3 changes: 2 additions & 1 deletion pkg/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ func InitPrometheus(config *config.Config) {
)
}

func MetricsExtraHandlers() map[string]http.HandlerFunc {
// ExtraHandlers returns a map of additional endpoint handlers
func ExtraHandlers() map[string]http.HandlerFunc {
return metricsExtraHandlers
}

Expand Down
4 changes: 4 additions & 0 deletions pkg/reconciler/build/build.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright The Shipwright Contributors
//
// SPDX-License-Identifier: Apache-2.0

package build

import (
Expand Down
4 changes: 4 additions & 0 deletions pkg/reconciler/build/controller.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright The Shipwright Contributors
//
// SPDX-License-Identifier: Apache-2.0

package build

import (
Expand Down
4 changes: 4 additions & 0 deletions pkg/reconciler/buildrun/buildrun.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright The Shipwright Contributors
//
// SPDX-License-Identifier: Apache-2.0

package buildrun

import (
Expand Down
3 changes: 3 additions & 0 deletions pkg/reconciler/buildrun/buildrun_suite_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright The Shipwright Contributors
//
// SPDX-License-Identifier: Apache-2.0
package buildrun_test

import (
Expand Down
4 changes: 4 additions & 0 deletions pkg/reconciler/buildrun/controller.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright The Shipwright Contributors
//
// SPDX-License-Identifier: Apache-2.0

package buildrun

import (
Expand Down
4 changes: 4 additions & 0 deletions pkg/validate/ownerreferences.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright The Shipwright Contributors
//
// SPDX-License-Identifier: Apache-2.0

package validate

import (
Expand Down
4 changes: 4 additions & 0 deletions pkg/validate/runtime.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright The Shipwright Contributors
//
// SPDX-License-Identifier: Apache-2.0

package validate

import (
Expand Down
4 changes: 4 additions & 0 deletions pkg/validate/secrets.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright The Shipwright Contributors
//
// SPDX-License-Identifier: Apache-2.0

package validate

import (
Expand Down
4 changes: 4 additions & 0 deletions pkg/validate/sourceurl.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright The Shipwright Contributors
//
// SPDX-License-Identifier: Apache-2.0

package validate

import (
Expand Down
4 changes: 4 additions & 0 deletions pkg/validate/strategies.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright The Shipwright Contributors
//
// SPDX-License-Identifier: Apache-2.0

package validate

import (
Expand Down
4 changes: 4 additions & 0 deletions pkg/validate/validate.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright The Shipwright Contributors
//
// SPDX-License-Identifier: Apache-2.0

package validate

import (
Expand Down

0 comments on commit cf042ae

Please sign in to comment.