Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tdawe committed Sep 10, 2021
0 parents commit ceda87f
Show file tree
Hide file tree
Showing 236 changed files with 34,843 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# CODEOWNERS
#
# documentation for this file can be found at:
# https://help.github.com/en/articles/about-code-owners

# These are the default owners for the code and will
# be requested for review when someone opens a pull request.
# order is alphabetical for easier maintenance.
#
# Ashish Verma (ashish2207)
# Bahubali Jain (bahubali-jain)
# Francis Nijay (francis-nijay)
# Harish P (harishp8889)
# Michael Edegware (medegw01)
# Prsanna Muthukumaraswamy (prablr79)
# Sean Gallacher (gallacher)
# Trevor Dawe (tdawe)

# for all files:
* @ashish2207 @bahubali-jain @francis-nijay @harishp8889 @medegw01 @prablr79 @gallacher @tdawe
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/ask-a-question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: Ask a question
about: Ask a question.
title: "[QUESTION]:"
labels: type/question
assignees: ''

---
### How can the Team help you today?

**Details: ?**
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG]:"
labels: type/bug, needs-triage
assignees: ''

---
**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Step 1 ...
2. Step 2 ...
3. Step 3 ...
...
n. Step n See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Logs**
If applicable, submit logs or stack traces from the affected services

**System Information (please complete the following information):**
- OS/Version: [e.g. RHEL 7.6]
- Kubernetes Version [e.g. 1.18]
- Additional Information...

**Additional context**
Add any other context about the problem here.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: CSM mailing list
alias: [email protected]
about: Please ask and answer usage questions and report security issues here.
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[FEATURE]:"
labels: type/feature-request, needs-triage
assignees: ''

---
**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
6 changes: 6 additions & 0 deletions .github/containerscan/allowedlist.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
general:
vulnerabilities:
# list of CVEs that are currently unfixed
- CVE-2019-1010022
- CVE-2020-26160
- CVE-2019-5827
18 changes: 18 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#### Submission Checklist

#### Common
* [ ] Have you run vet & lint checks against your submission?
* [ ] Have you made sure that the code compiles?
* [ ] Did you run the unit & integration tests successfully?
* [ ] Did you run tests in a real Kubernetes cluster?
* [ ] Did you verify if you are _not_ checking in any local image references? For e.g. -in a Makefile, env.sh

#### Swagger
* [ ] Have you made any changes to the APIs?
* [ ] Have you verified the newly added API is working properly from the swagger?
* [ ] Have you checked whether the existing APIs are not broken?
* [ ] Have you verified if the docker image builds successfully?

### Description of your changes
< your description goes here >

83 changes: 83 additions & 0 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Workflow
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
code-check:
name: Check Go formatting, linting, vetting
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Run the formatter, linter, and vetter
uses: dell/common-github-actions/go-code-formatter-linter-vetter@main
with:
directories: ./...
sanitize:
name: Check for forbidden words
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Run the forbidden words scan
uses: dell/common-github-actions/code-sanitizer@main
with:
args: /github/workspace
test:
name: Run Go unit tests and check package coverage
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Run unit tests and check package coverage
uses: dell/common-github-actions/go-code-tester@main
with:
threshold: 90
go_security_scan:
name: Go security
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Run Go Security
uses: securego/gosec@master
malware_security_scan:
name: Malware Scanner
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Run malware scan
uses: dell/common-github-actions/malware-scanner@main
with:
directories: .
options: -ri
image_security_scan:
name: Image Scanner
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.16+
uses: actions/setup-go@v2
with:
go-version: ^1.16
id: go
- name: Checkout the code
uses: actions/checkout@v2
- name: Install Mockgen
run: go get github.com/golang/mock/[email protected]
- name: Get dependencies
run: go mod download
- name: Build Docker Images
run: make build image data-collector
- name: Scan Data Collector Image
uses: Azure/container-scan@v0
with:
image-name: csm-data-collector:v0.0.1
severity-threshold: HIGH
- name: Scan Common Installer Image
uses: Azure/container-scan@v0
with:
image-name: dell-common-installer:v0.0.1
severity-threshold: HIGH
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
*.db
.idea/
dell-common-installer
scripts/swagger.json
vendor
user.json
/cmd/csm-cli/csm-cli
/cmd/csm-cli/csm-cli.exe
/cmd/csm-cli/csm
.vscode
/templates/repctl.exe
/templates/repctl
cockroach-data
.cockroach
20 changes: 20 additions & 0 deletions ADOPTERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!--
Copyright (c) 2021 Dell Inc., or its subsidiaries. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
-->
# Adopters

These organizations are using Container Storage Modules (CSM) in production:

If you're using CSM and wish to be listed, please feel free to
[submit a pull request](https://github.com/dell/csm/pulls) using the following guidelines:

* Add a reference (link to a public blog post, video, slides, etc) mentioning the use of CSM

| Organization | Reference |
| ------------ | --------- |
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
ARG BASE_IMG
FROM $BASE_IMG AS builder

WORKDIR /app

RUN apt update
RUN apt install -y build-essential wget

RUN wget -O kapp https://github.com/vmware-tanzu/carvel-kapp/releases/download/v0.39.0/kapp-linux-amd64 && chmod +x kapp

FROM registry.access.redhat.com/ubi8/ubi-minimal:8.4-208

WORKDIR /app

COPY templates templates
COPY --from=builder /app/kapp .
COPY "dell-common-installer" .

CMD ["/app/dell-common-installer"]

EXPOSE 8080
22 changes: 22 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
ARG BASE_IMG
FROM $BASE_IMG AS replication-builder

WORKDIR /app

RUN wget -O kapp https://github.com/vmware-tanzu/carvel-kapp/releases/download/v0.39.0/kapp-linux-amd64 && chmod +x kapp

COPY dell-csi-replicator dell-csi-replicator
RUN cd dell-csi-replicator/repctl && make build \
&& chmod +x repctl \
&& cp repctl /app

FROM registry.access.redhat.com/ubi8/ubi-minimal:8.4-208
WORKDIR /app
COPY templates templates
COPY --from=replication-builder /app/kapp .
COPY --from=replication-builder /app/repctl ./templates
COPY "dell-common-installer" .

CMD ["/app/dell-common-installer"]

EXPOSE 8080
Loading

0 comments on commit ceda87f

Please sign in to comment.