Skip to content

Commit

Permalink
Merge 5da6814 into bfc4478
Browse files Browse the repository at this point in the history
  • Loading branch information
bhuvanessr committed May 27, 2020
2 parents bfc4478 + 5da6814 commit cb5b54a
Show file tree
Hide file tree
Showing 16 changed files with 2,967 additions and 2,454 deletions.
416 changes: 215 additions & 201 deletions Makefile

Large diffs are not rendered by default.

17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ of images and onto which worker nodes those images should be cached (i.e. pre-pu
_kube-fledged_ provides CRUD APIs to manage the lifecycle of the image cache, and supports several configurable parameters to customize the functioning as per one's needs.

## Table of contents
<!-- https://github.com/thlorenz/doctoc -->
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

Expand All @@ -34,6 +35,7 @@ _kube-fledged_ provides CRUD APIs to manage the lifecycle of the image cache, an
- [Remove kube-fledged](#remove-kube-fledged)
- [How it works](#how-it-works)
- [Configuration Flags](#configuration-flags)
- [Supported Container Runtimes](#supported-container-runtimes)
- [Supported Platforms](#supported-platforms)
- [Built With](#built-with)
- [Contributing](#contributing)
Expand All @@ -52,8 +54,7 @@ _kube-fledged_ provides CRUD APIs to manage the lifecycle of the image cache, an

- A functioning kubernetes cluster (v1.9 or above). It could be a simple development cluster like minikube or a large production cluster.
- All master and worker nodes having the ["kubernetes.io/hostname"](https://kubernetes.io/docs/reference/kubernetes-api/labels-annotations-taints/#kubernetes-io-hostname) label.
- Supported container runtimes: docker, containerd, cri-o
- git, make, go, docker and kubectl installed on a local linux machine. kubectl configured properly to access the cluster.
- git, make, go, docker engine (>= 19.03) and kubectl installed on a local linux machine. kubectl configured properly to access the cluster.

## Quick Install using YAML manifests

Expand All @@ -70,7 +71,7 @@ These instructions install _kube-fledged_ to a separate namespace called "kube-f
- Deploy _kube-fledged_ to the cluster

```
$ make deploy
$ make deploy-using-yaml
```

- Verify if _kube-fledged_ deployed successfully
Expand Down Expand Up @@ -133,9 +134,9 @@ These instructions will help you build _kube-fledged_ from source and deploy it
```
$ export RELEASE_VERSION=<your_tag>
$ export FLEDGED_IMAGE_REPO=<your_docker_hub_username>/fledged
$ export FLEDGED_DOCKER_CLIENT_IMAGE_REPO=<your_docker_hub_username>/fledged-docker-client
$ docker login -u <username> -p <password>
$ make fledged-image && make client-image && make push-images
$ export DOCKER_CLI_EXPERIMENTAL=enabled
$ sudo make install-buildx && sudo make fledged-image
```

### Deploy
Expand Down Expand Up @@ -267,6 +268,12 @@ For more detailed description, go through _kube-fledged's_ [design proposal](doc

`--stderrthreshold:` Log level. set the value of this flag to INFO

## Supported Container Runtimes

- docker
- containerd
- cri-o

## Supported Platforms

- linux/amd64
Expand Down
60 changes: 30 additions & 30 deletions build/Dockerfile.fledged
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
# Copyright 2018 The kube-fledged authors.
#
# 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.

ARG GOLANG_VERSION
ARG ALPINE_VERSION

FROM golang:$GOLANG_VERSION AS builder
LABEL stage=builder
ARG GIT_BRANCH
RUN mkdir -p /go/src/github.com/senthilrch && \
git clone --depth=1 --single-branch --branch=$GIT_BRANCH https://github.com/senthilrch/kube-fledged /go/src/github.com/senthilrch/kube-fledged && \
cd /go/src/github.com/senthilrch/kube-fledged && \
CGO_ENABLED=0 go build -o build/fledged -ldflags '-s -w -extldflags "-static"' cmd/fledged.go

FROM alpine:$ALPINE_VERSION
LABEL maintainer="senthilrch <senthilrch@gmail.com>"
COPY --from=builder /go/src/github.com/senthilrch/kube-fledged/build/fledged /opt/bin/fledged
RUN chmod 755 /opt/bin/fledged
ENTRYPOINT ["/opt/bin/fledged"]
# Copyright 2018 The kube-fledged authors.
#
# 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.
ARG GOLANG_VERSION
ARG ALPINE_VERSION
FROM golang:$GOLANG_VERSION AS builder
LABEL stage=builder
ARG GIT_BRANCH
RUN mkdir -p /go/src/github.com/senthilrch && \
git clone --depth=1 --single-branch --branch=$GIT_BRANCH https://github.com/senthilrch/kube-fledged /go/src/github.com/senthilrch/kube-fledged && \
cd /go/src/github.com/senthilrch/kube-fledged && \
CGO_ENABLED=0 go build -o build/fledged -ldflags '-s -w -extldflags "-static"' cmd/fledged/main.go
FROM alpine:$ALPINE_VERSION
LABEL maintainer="senthilrch <senthilrch@gmail.com>"
COPY --from=builder /go/src/github.com/senthilrch/kube-fledged/build/fledged /opt/bin/fledged
RUN chmod 755 /opt/bin/fledged
ENTRYPOINT ["/opt/bin/fledged"]
30 changes: 30 additions & 0 deletions build/Dockerfile.webhook_server
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright 2018 The kube-fledged authors.
#
# 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.

ARG GOLANG_VERSION
ARG ALPINE_VERSION

FROM golang:$GOLANG_VERSION AS builder
LABEL stage=builder
ARG GIT_BRANCH
RUN mkdir -p /go/src/github.com/senthilrch && \
git clone --depth=1 --single-branch --branch=$GIT_BRANCH https://github.com/senthilrch/kube-fledged /go/src/github.com/senthilrch/kube-fledged && \
cd /go/src/github.com/senthilrch/kube-fledged && \
CGO_ENABLED=0 go build -o build/fledged-webhook-server -ldflags '-s -w -extldflags "-static"' cmd/webhook-server/main.go

FROM alpine:$ALPINE_VERSION
LABEL maintainer="senthilrch <senthilrch@gmail.com>"
COPY --from=builder /go/src/github.com/senthilrch/kube-fledged/build/fledged-webhook-server /opt/bin/fledged-webhook-server
RUN chmod 755 /opt/bin/fledged-webhook-server
ENTRYPOINT ["/opt/bin/fledged-webhook-server"]
Loading

0 comments on commit cb5b54a

Please sign in to comment.