Skip to content

Commit

Permalink
Init commit for CCE Operator
Browse files Browse the repository at this point in the history
  • Loading branch information
STARRY-S committed Jun 28, 2023
1 parent 22bec43 commit 21fbfd0
Show file tree
Hide file tree
Showing 57 changed files with 6,833 additions and 25 deletions.
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,26 @@

# Go workspace file
go.work

# Dapper
.dapper
/Dockerfile.dapper*
!/Dockerfile.dapper

# VSCode
/.vscode/

# Build files
/bin/
/dist/
/cce-operator

# Generated code
# zz_*
# /pkg/generated

# macOS
.DS_Store

# Temp files
/tmp*
28 changes: 28 additions & 0 deletions Dockerfile.dapper
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM registry.suse.com/bci/golang:1.19

ARG DAPPER_HOST_ARCH
ENV ARCH=${DAPPER_HOST_ARCH}

ARG HTTP_PROXY
ARG HTTPS_PROXY
ENV HTTP_PROXY=${HTTP_PROXY} HTTPS_PROXY=${HTTPS_PROXY}
RUN zypper ref && \
zypper -n up && \
zypper -n in vim wget git tar gzip && \
zypper clean

RUN curl -sL https://get.helm.sh/helm-v3.3.0-linux-${ARCH}.tar.gz | \
tar xvzf - -C /usr/local/bin --strip-components=1
# RUN go env -w GOPROXY=https://goproxy.cn,direct
# pre-copy/cache go.mod for pre-downloading dependencies
COPY go.mod go.sum ./
RUN go mod download && go mod verify

ENV DAPPER_ENV REPO TAG DRONE_TAG CROSS
ENV DAPPER_SOURCE /go/src/github.com/STARRY-S/cce-operator/
ENV DAPPER_OUTPUT ./bin ./dist
ENV DAPPER_DOCKER_SOCKET true
WORKDIR ${DAPPER_SOURCE}

ENTRYPOINT ["./scripts/entry.sh"]
CMD ["ci"]
24 changes: 0 additions & 24 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -175,27 +175,3 @@

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

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

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
24 changes: 24 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
SCRIPTS := build test ci validate
.PHONY: $(SCRIPTS) clean generate help

.dapper:
@echo Downloading dapper
@curl -sL https://releases.rancher.com/dapper/latest/dapper-`uname -s`-`uname -m` > .dapper.tmp
@chmod +x .dapper.tmp
@./.dapper.tmp -v
@mv .dapper.tmp .dapper

$(SCRIPTS): .dapper
@./.dapper $@

clean:
@./scripts/clean.sh

generate:
@go generate ./main.go

help:
@echo "Usage:"
@echo " make build - Build executable files in 'bin' folder"
@echo " make test - Run unit test"
@echo " make generate - Generate codes & CRDs"
31 changes: 30 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,30 @@
# cce-operator-
## cce-operator

> WIP
Usage:

```sh
make generate
go build .

kubectl apply -f ./charts/cce-operator-crd/templates/crds.yaml
kubectl apply -f ./examples/create-example.yaml
./cce-operator --debug
```

## License

Copyright 2023 [Rancher Labs, Inc](https://rancher.com).

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

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Loading

0 comments on commit 21fbfd0

Please sign in to comment.