Skip to content
This repository was archived by the owner on Oct 14, 2020. It is now read-only.

Remove "experimental" from CRDs Name #130

Merged
merged 2 commits into from
Oct 5, 2020
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
2 changes: 1 addition & 1 deletion docs/adr/adr_0002.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ The _secureCodeBox operator_ would process all these CRDs in the namespace of th

[source,yaml]
----
apiVersion: execution.experimental.securecodebox.io/v1
apiVersion: execution.securecodebox.io/v1
kind: ScanCompletionHook
metadata:
name: my-metadata
Expand Down
10 changes: 5 additions & 5 deletions docs/adr/adr_0003.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ When a finding matches a rule the "scanSpec" section will then be used to create
To customize the scan to match the finding, the [mustache](https://github.com/janl/mustache.js) templating language can be used to reference fields of the finding.

```yaml
apiVersion: "cascading.experimental.securecodebox.io/v1"
apiVersion: "cascading.securecodebox.io/v1"
kind: CascadingRule
metadata:
name: "tls-scans"
Expand Down Expand Up @@ -110,7 +110,7 @@ By default no cascading Rules will be used.

```yaml
# Nmap Scan without cascading rules
apiVersion: "execution.experimental.securecodebox.io/v1"
apiVersion: "execution.securecodebox.io/v1"
kind: Scan
metadata:
name: "portscan-berlin-wifi"
Expand All @@ -125,7 +125,7 @@ spec:
To enable cascading rules you need to specify a label selector to select the cascading rules you'd like

```yaml
apiVersion: "execution.experimental.securecodebox.io/v1"
apiVersion: "execution.securecodebox.io/v1"
kind: Scan
metadata:
name: "portscan-berlin-wifi"
Expand All @@ -145,7 +145,7 @@ spec:
To implicitly enable all cascading rules (not-recommended) a empty label selector can be used

```yaml
apiVersion: "execution.experimental.securecodebox.io/v1"
apiVersion: "execution.securecodebox.io/v1"
kind: Scan
metadata:
name: "portscan-berlin-wifi"
Expand All @@ -163,7 +163,7 @@ spec:
The label selectors also allow the more powerful [matchExpression](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#set-based-requirement) selectors:

```yaml
apiVersion: "execution.experimental.securecodebox.io/v1"
apiVersion: "execution.securecodebox.io/v1"
kind: Scan
metadata:
name: "example.com"
Expand Down
4 changes: 2 additions & 2 deletions docs/user-guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ This is implemented using kubernetes label selectors, meaning that scans mark th

```bash
cat <<EOF | kubectl apply -f -
apiVersion: "execution.experimental.securecodebox.io/v1"
apiVersion: "execution.securecodebox.io/v1"
kind: Scan
metadata:
name: "example.com"
Expand Down Expand Up @@ -103,7 +103,7 @@ The label selectors also allow the more powerful [matchExpression](https://kuber

```bash
cat <<EOF | kubectl apply -f -
apiVersion: "execution.experimental.securecodebox.io/v1"
apiVersion: "execution.securecodebox.io/v1"
kind: Scan
metadata:
name: "example.com"
Expand Down
4 changes: 2 additions & 2 deletions hook-sdk/nodejs/hook-wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ async function updateFindings(findings) {
}

await k8sApi.patchNamespacedCustomObjectStatus(
"execution.experimental.securecodebox.io",
"execution.securecodebox.io",
"v1",
namespace,
"scans",
Expand Down Expand Up @@ -133,7 +133,7 @@ async function main() {
let scan;
try {
const { body } = await k8sApi.getNamespacedCustomObject(
"execution.experimental.securecodebox.io",
"execution.securecodebox.io",
"v1",
namespace,
"scans",
Expand Down
4 changes: 2 additions & 2 deletions hooks/declarative-subsequent-scans/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ This is implemented using kubernetes label selectors, meaning that scans mark th
### Example
```yaml
cat <<EOF | kubectl apply -f -
apiVersion: "execution.experimental.securecodebox.io/v1"
apiVersion: "execution.securecodebox.io/v1"
kind: Scan
metadata:
name: "example.com"
Expand Down Expand Up @@ -81,7 +81,7 @@ The label selectors also allow the more powerful matchExpression selectors:

```yaml
cat <<EOF | kubectl apply -f -
apiVersion: "execution.experimental.securecodebox.io/v1"
apiVersion: "execution.securecodebox.io/v1"
kind: Scan
metadata:
name: "example.com"
Expand Down
4 changes: 2 additions & 2 deletions hooks/declarative-subsequent-scans/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ This is implemented using kubernetes label selectors, meaning that scans mark th
### Example
```yaml
cat <<EOF | kubectl apply -f -
apiVersion: "execution.experimental.securecodebox.io/v1"
apiVersion: "execution.securecodebox.io/v1"
kind: Scan
metadata:
name: "example.com"
Expand Down Expand Up @@ -81,7 +81,7 @@ The label selectors also allow the more powerful matchExpression selectors:

```yaml
cat <<EOF | kubectl apply -f -
apiVersion: "execution.experimental.securecodebox.io/v1"
apiVersion: "execution.securecodebox.io/v1"
kind: Scan
metadata:
name: "example.com"
Expand Down
4 changes: 2 additions & 2 deletions hooks/declarative-subsequent-scans/hook.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ let sslyzeCascadingRules = undefined;

beforeEach(() => {
parentScan = {
apiVersion: "execution.experimental.securecodebox.io/v1",
apiVersion: "execution.securecodebox.io/v1",
kind: "Scan",
metadata: {
name: "nmap-foobar.com",
Expand All @@ -20,7 +20,7 @@ beforeEach(() => {

sslyzeCascadingRules = [
{
apiVersion: "cascading.experimental.securecodebox.io/v1",
apiVersion: "cascading.securecodebox.io/v1",
kind: "CascadingRule",
metadata: {
name: "tls-scans",
Expand Down
8 changes: 4 additions & 4 deletions hooks/declarative-subsequent-scans/scan-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export async function startSubsequentSecureCodeBoxScan({
}

const scanDefinition = {
apiVersion: "execution.experimental.securecodebox.io/v1",
apiVersion: "execution.securecodebox.io/v1",
kind: "Scan",
metadata: {
generateName: `${name}-`,
Expand All @@ -89,7 +89,7 @@ export async function startSubsequentSecureCodeBoxScan({
},
ownerReferences: [
{
apiVersion: "execution.experimental.securecodebox.io/v1",
apiVersion: "execution.securecodebox.io/v1",
blockOwnerDeletion: true,
controller: true,
kind: "Scan",
Expand All @@ -110,7 +110,7 @@ export async function startSubsequentSecureCodeBoxScan({
try {
// Submitting the Scan to the kubernetes api
await k8sApiCRD.createNamespacedCustomObject(
"execution.experimental.securecodebox.io",
"execution.securecodebox.io",
"v1",
namespace,
"scans",
Expand All @@ -137,7 +137,7 @@ export async function getCascadingRulesForScan(scan: Scan) {
);

const response: any = await k8sApiCRD.listNamespacedCustomObject(
"cascading.experimental.securecodebox.io",
"cascading.securecodebox.io",
"v1",
namespace,
"cascadingrules",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: "execution.experimental.securecodebox.io/v1"
apiVersion: "execution.securecodebox.io/v1"
kind: ScanCompletionHook
metadata:
name: {{ include "declarative-subsequent-scans.fullname" . }}
Expand Down
6 changes: 3 additions & 3 deletions hooks/declarative-subsequent-scans/templates/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ metadata:
namespace: {{ .Release.Namespace }}
rules:
- apiGroups:
- execution.experimental.securecodebox.io
- execution.securecodebox.io
resources:
- scans
verbs:
- get
- create
- apiGroups:
- execution.experimental.securecodebox.io
- execution.securecodebox.io
resources:
- scans/status
verbs:
- get
- patch
- apiGroups:
- cascading.experimental.securecodebox.io
- cascading.securecodebox.io
resources:
- cascadingrules
verbs:
Expand Down
2 changes: 1 addition & 1 deletion hooks/generic-webhook/templates/webhook-hook.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: "execution.experimental.securecodebox.io/v1"
apiVersion: "execution.securecodebox.io/v1"
kind: ScanCompletionHook
metadata:
name: {{ include "generic-webhook.fullname" . }}
Expand Down
6 changes: 3 additions & 3 deletions hooks/imperative-subsequent-scans/scan-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ async function startSubsequentSecureCodeBoxScan({
parameters,
}) {
const scanDefinition = {
apiVersion: "execution.experimental.securecodebox.io/v1",
apiVersion: "execution.securecodebox.io/v1",
kind: "Scan",
metadata: {
name: name,
Expand All @@ -26,7 +26,7 @@ async function startSubsequentSecureCodeBoxScan({
},
ownerReferences: [
{
apiVersion: "execution.experimental.securecodebox.io/v1",
apiVersion: "execution.securecodebox.io/v1",
blockOwnerDeletion: true,
controller: true,
kind: "Scan",
Expand All @@ -50,7 +50,7 @@ async function startSubsequentSecureCodeBoxScan({
// Starting another subsequent sslyze scan based on the nmap results
// found at: https://github.com/kubernetes-client/javascript/blob/79736b9a608c18d818de61a6b44503a08ea3a78f/src/gen/api/customObjectsApi.ts#L209
await k8sApiCRD.createNamespacedCustomObject(
"execution.experimental.securecodebox.io",
"execution.securecodebox.io",
"v1",
process.env["NAMESPACE"],
"scans",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: "execution.experimental.securecodebox.io/v1"
apiVersion: "execution.securecodebox.io/v1"
kind: ScanCompletionHook
metadata:
name: {{ .Release.Name }}
Expand Down
4 changes: 2 additions & 2 deletions hooks/imperative-subsequent-scans/templates/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ metadata:
namespace: {{ .Release.Namespace }}
rules:
- apiGroups:
- execution.experimental.securecodebox.io
- execution.securecodebox.io
resources:
- scans
verbs:
- get
- list
- create
- apiGroups:
- execution.experimental.securecodebox.io
- execution.securecodebox.io
resources:
- scans/status
verbs:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: "execution.experimental.securecodebox.io/v1"
apiVersion: "execution.securecodebox.io/v1"
kind: ScanCompletionHook
metadata:
name: {{ .Release.Name }}
Expand Down
2 changes: 1 addition & 1 deletion hooks/update-field/templates/update-field-hook.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: "execution.experimental.securecodebox.io/v1"
apiVersion: "execution.securecodebox.io/v1"
kind: ScanCompletionHook
metadata:
name: {{ .Release.Name }}
Expand Down
2 changes: 1 addition & 1 deletion operator/PROJECT
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
domain: experimental.securecodebox.io
domain: securecodebox.io
multigroup: true
repo: github.com/secureCodeBox/secureCodeBox-v2
resources:
Expand Down
4 changes: 2 additions & 2 deletions operator/apis/cascading/v1/groupversion_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ limitations under the License.

// Package v1 contains API Schema definitions for the cascading v1 API group
// +kubebuilder:object:generate=true
// +groupName=cascading.experimental.securecodebox.io
// +groupName=cascading.securecodebox.io
package v1

import (
Expand All @@ -26,7 +26,7 @@ import (

var (
// GroupVersion is group version used to register these objects
GroupVersion = schema.GroupVersion{Group: "cascading.experimental.securecodebox.io", Version: "v1"}
GroupVersion = schema.GroupVersion{Group: "cascading.securecodebox.io", Version: "v1"}

// SchemeBuilder is used to add go types to the GroupVersionKind scheme
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
Expand Down
4 changes: 2 additions & 2 deletions operator/apis/execution/v1/groupversion_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ limitations under the License.

// Package v1 contains API Schema definitions for the execution v1 API group
// +kubebuilder:object:generate=true
// +groupName=execution.experimental.securecodebox.io
// +groupName=execution.securecodebox.io
package v1

import (
Expand All @@ -26,7 +26,7 @@ import (

var (
// GroupVersion is group version used to register these objects
GroupVersion = schema.GroupVersion{Group: "execution.experimental.securecodebox.io", Version: "v1"}
GroupVersion = schema.GroupVersion{Group: "execution.securecodebox.io", Version: "v1"}

// SchemeBuilder is used to add go types to the GroupVersionKind scheme
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
Expand Down
2 changes: 1 addition & 1 deletion operator/apis/execution/v1/scancompletionhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ type ScanCompletionHookSpec struct {
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
Env []corev1.EnvVar `json:"env,omitempty"`
Type HookType `json:"type"`
// ServiceAccountName Name of the serviceAccount Name used. Should only be used if your hook needs specifc RBAC Access. Otherwise the hook is run using a "scan-completion-hook" service account. The service account should have at least "get" rights on scans.execution.experimental.securecodebox.io, and "get" & "patch" scans.execution.experimental.securecodebox.io/status
// ServiceAccountName Name of the serviceAccount Name used. Should only be used if your hook needs specifc RBAC Access. Otherwise the hook is run using a "scan-completion-hook" service account. The service account should have at least "get" rights on scans.execution.securecodebox.io, and "get" & "patch" scans.execution.securecodebox.io/status
ServiceAccountName *string `json:"serviceAccountName,omitempty"`
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.4
creationTimestamp: null
name: cascadingrules.cascading.experimental.securecodebox.io
name: cascadingrules.cascading.securecodebox.io
spec:
additionalPrinterColumns:
- JSONPath: .spec.scanSpec.scanType
Expand All @@ -23,7 +23,7 @@ spec:
'light' or 'medium'
name: Intensiveness
type: string
group: cascading.experimental.securecodebox.io
group: cascading.securecodebox.io
names:
kind: CascadingRule
listKind: CascadingRuleList
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.4
creationTimestamp: null
name: parsedefinitions.execution.experimental.securecodebox.io
name: parsedefinitions.execution.securecodebox.io
spec:
additionalPrinterColumns:
- JSONPath: .spec.handlesResultsType
Expand All @@ -17,7 +17,7 @@ spec:
description: Scanner Container Image
name: Image
type: string
group: execution.experimental.securecodebox.io
group: execution.securecodebox.io
names:
kind: ParseDefinition
listKind: ParseDefinitionList
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.4
creationTimestamp: null
name: scancompletionhooks.execution.experimental.securecodebox.io
name: scancompletionhooks.execution.securecodebox.io
spec:
additionalPrinterColumns:
- JSONPath: .spec.type
Expand All @@ -17,7 +17,7 @@ spec:
description: ScanCompletionHook Image
name: Image
type: string
group: execution.experimental.securecodebox.io
group: execution.securecodebox.io
names:
kind: ScanCompletionHook
listKind: ScanCompletionHookList
Expand Down Expand Up @@ -160,8 +160,8 @@ spec:
description: ServiceAccountName Name of the serviceAccount Name used.
Should only be used if your hook needs specifc RBAC Access. Otherwise
the hook is run using a "scan-completion-hook" service account. The
service account should have at least "get" rights on scans.execution.experimental.securecodebox.io,
and "get" & "patch" scans.execution.experimental.securecodebox.io/status
service account should have at least "get" rights on scans.execution.securecodebox.io,
and "get" & "patch" scans.execution.securecodebox.io/status
type: string
type:
description: HookType Defines weather the hook should be able to change
Expand Down
Loading