-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Signed-off-by: Ricardo Zanini <[email protected]>
- Loading branch information
1 parent
84ced1e
commit b31b486
Showing
31 changed files
with
793 additions
and
243 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Nexus Operator PR Checks | ||
on: [push] | ||
jobs: | ||
unit_test: | ||
name: Unit Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.14 | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.14 | ||
id: go | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/go/pkg/mod/cache | ||
key: ${{ runner.os }}-go-cache-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go-cache- | ||
- name: Mod Tidy | ||
run: | | ||
go mod tidy | ||
- name: FMT | ||
run: gofmt -s -l -w cmd/ pkg/ version/ | ||
|
||
- name: Vet | ||
run: go vet ./... | ||
|
||
- name: Test Packages | ||
run: go test ./pkg/... -count=1 | ||
|
||
olm_verify: | ||
name: Operator OLM Verify | ||
runs-on: ubuntu-latest | ||
env: | ||
OPERATOR_SDK_VERSION: 0.17.0 | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache Operator SDK Binary | ||
uses: actions/cache@v1 | ||
with: | ||
path: ./bin | ||
key: ${{ runner.os }}-operator-sdk-${{ env.OPERATOR_SDK_VERSION }} | ||
restore-keys: | | ||
${{ runner.os }}-operator-sdk- | ||
- name: Install Operator SDK | ||
run: | | ||
./hack/ci/install-operator-sdk.sh | ||
echo "::add-path::$GITHUB_WORKSPACE/bin" | ||
- name: Generate Manifests | ||
run: ./hack/generate-manifests.sh | ||
|
||
- name: Run Operator Framewok verify | ||
run: ./hack/operator-verify.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
scorecard: | ||
# Setting a global scorecard option | ||
output: json | ||
output: text | ||
plugins: | ||
- basic: | ||
cr-manifest: | ||
- "deploy/crds/apps.m88i.io_v1alpha1_nexus_cr.yaml" | ||
- olm: | ||
cr-manifest: | ||
- "deploy/crds/apps.m88i.io_v1alpha1_nexus_cr.yaml" | ||
csv-path: "deploy/olm-catalog/nexus-operator/0.2.0-rc1/nexus-operator.v0.2.0-rc1.clusterserviceversion.yaml" | ||
|
||
csv-path: "deploy/olm-catalog/nexus-operator/0.2.0/nexus-operator.v0.2.0.clusterserviceversion.yaml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,3 @@ | ||
#!/bin/sh -e | ||
|
||
# This is documented here: | ||
# https://docs.openshift.com/container-platform/3.11/creating_images/guidelines.html#openshift-specific-guidelines | ||
|
||
if ! whoami &>/dev/null; then | ||
if [ -w /etc/passwd ]; then | ||
echo "${USER_NAME:-nexus-operator}:x:$(id -u):$(id -g):${USER_NAME:-nexus-operator} user:${HOME}:/sbin/nologin" >> /etc/passwd | ||
fi | ||
fi | ||
|
||
exec ${OPERATOR} $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,11 +12,10 @@ metadata: | |
}, | ||
"spec": { | ||
"networking": { | ||
"expose": true | ||
"expose": false | ||
}, | ||
"persistence": { | ||
"persistent": true, | ||
"volumeSize": "10Gi" | ||
"persistent": false | ||
}, | ||
"replicas": 1, | ||
"resources": { | ||
|
@@ -31,94 +30,6 @@ metadata: | |
}, | ||
"useRedHatImage": false | ||
} | ||
}, | ||
{ | ||
"apiVersion": "apps.m88i.io/v1alpha1", | ||
"kind": "Nexus", | ||
"metadata": { | ||
"name": "nexus3" | ||
}, | ||
"spec": { | ||
"networking": { | ||
"expose": true, | ||
"exposeAs": "Ingress", | ||
"host": "nexus.example.com" | ||
}, | ||
"persistence": { | ||
"persistent": true, | ||
"volumeSize": "10Gi" | ||
}, | ||
"replicas": 1, | ||
"resources": { | ||
"limits": { | ||
"cpu": "2", | ||
"memory": "2Gi" | ||
}, | ||
"requests": { | ||
"cpu": "1", | ||
"memory": "2Gi" | ||
} | ||
}, | ||
"useRedHatImage": false | ||
} | ||
}, | ||
{ | ||
"apiVersion": "apps.m88i.io/v1alpha1", | ||
"kind": "Nexus", | ||
"metadata": { | ||
"name": "nexus3" | ||
}, | ||
"spec": { | ||
"networking": { | ||
"expose": true, | ||
"exposeAs": "NodePort", | ||
"nodePort": 31031 | ||
}, | ||
"persistence": { | ||
"persistent": true, | ||
"volumeSize": "10Gi" | ||
}, | ||
"replicas": 1, | ||
"resources": { | ||
"limits": { | ||
"cpu": "2", | ||
"memory": "2Gi" | ||
}, | ||
"requests": { | ||
"cpu": "1", | ||
"memory": "2Gi" | ||
} | ||
}, | ||
"useRedHatImage": false | ||
} | ||
}, | ||
{ | ||
"apiVersion": "apps.m88i.io/v1alpha1", | ||
"kind": "Nexus", | ||
"metadata": { | ||
"name": "nexus3" | ||
}, | ||
"spec": { | ||
"networking": { | ||
"expose": true | ||
}, | ||
"persistence": { | ||
"persistent": true, | ||
"volumeSize": "10Gi" | ||
}, | ||
"replicas": 1, | ||
"resources": { | ||
"limits": { | ||
"cpu": "2", | ||
"memory": "2Gi" | ||
}, | ||
"requests": { | ||
"cpu": "1", | ||
"memory": "2Gi" | ||
} | ||
}, | ||
"useRedHatImage": true | ||
} | ||
} | ||
] | ||
capabilities: Basic Install | ||
|
@@ -177,7 +88,7 @@ spec: | |
After installing it, you will have to grab the `admin` user password from the deployed container. There's a file auto generated in `/nexus-data/admin.password`. | ||
Use `cat` to read the file and view the password. Use it to login for the first time and follow the on screen instructions to have the Nexus server ready for use. | ||
If you experience any issues or have any ideas for new features, please [file an issue in our Github repository](https://github.com/m88i/nexus-operator/issues). | ||
If you experience any issues or have any ideas for new features, please [file an issue in our Github repository](https://github.com/m88i/nexus-operator/issues) or send an email to our maillist: [[email protected]](mailto:[email protected]) | ||
*Please note that the operator is an individual work and it's not provided nor supported by Sonatype.* | ||
displayName: Nexus Operator | ||
|
@@ -231,14 +142,8 @@ spec: | |
- events | ||
- configmaps | ||
- secrets | ||
- limitranges | ||
- componentstatuses | ||
- persistentvolumes | ||
- bindings | ||
- replicationcontrollers | ||
- resourcequotas | ||
- podtemplates | ||
- serviceaccounts | ||
verbs: | ||
- create | ||
- delete | ||
|
@@ -277,6 +182,19 @@ spec: | |
- deployments/finalizers | ||
verbs: | ||
- update | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- pods | ||
verbs: | ||
- get | ||
- apiGroups: | ||
- apps | ||
resources: | ||
- replicasets | ||
- deployments | ||
verbs: | ||
- get | ||
- apiGroups: | ||
- apps.m88i.io | ||
resources: | ||
|
@@ -342,9 +260,10 @@ spec: | |
- name: Source | ||
url: https://github.com/m88i/nexus-operator | ||
maintainers: | ||
- email: ricardozanini@gmail.com | ||
- email: nexus-operator@googlegroups.com | ||
name: m88i Labs | ||
maturity: alpha | ||
provider: | ||
name: m88i Labs | ||
replaces: nexus-operator.v0.1.0 | ||
version: 0.2.0 |
Oops, something went wrong.