Move to click-to-deploy repository (#12)

This commit is contained in:
Armando Miani
2025-04-03 23:06:06 +02:00
committed by GitHub
parent c66cdc979e
commit 0d86ff4a1f
8 changed files with 1 additions and 308 deletions

7
.github/CODEOWNERS vendored
View File

@@ -1,7 +0,0 @@
# See https://help.github.com/en/articles/about-code-owners
# for more info about CODEOWNERS file.
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence.
* @GoogleCloudPlatform/launcher-operations
* @GoogleCloudPlatform/c2d-contributors

View File

@@ -1,36 +0,0 @@
# Copyright 2016 The Kubernetes Authors.
# Copyright 2018 Google LLC
#
# 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.
FROM marketplace.gcr.io/google/debian11
ENV NFS_VERSION 1:1.3.4-6
ENV C2D_RELEASE 1.3.4
RUN set -x && \
apt-get update && apt-get install -qq -y openssl nfs-kernel-server=${NFS_VERSION}* && \
rm -rf /var/lib/apt/lists/* && \
mkdir /exports
COPY docker-entrypoint.sh /usr/local/bin/
RUN chmod +rx /usr/local/bin/docker-entrypoint.sh
VOLUME /exports
EXPOSE 2049/tcp
EXPOSE 20048/tcp
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
CMD ["/exports"]

View File

@@ -1,79 +0,0 @@
#!/bin/bash
# Copyright 2015 The Kubernetes Authors.
# Copyright 2018 Google LLC
#
# 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.
function start()
{
unset gid
# accept "-G gid" option
while getopts "G:" opt; do
case ${opt} in
G) gid=${OPTARG};;
esac
done
shift $(($OPTIND - 1))
# prepare /etc/exports
for i in "$@"; do
# fsid=0: needed for NFSv4
echo "$i *(rw,fsid=0,sync,no_subtree_check,no_root_squash)" >> /etc/exports
if [ -v gid ] ; then
chmod 070 $i
chgrp $gid $i
fi
echo "Serving $i"
done
# start rpcbind if it is not started yet
/usr/sbin/rpcinfo 127.0.0.1 > /dev/null; s=$?
if [ $s -ne 0 ]; then
echo "Starting rpcbind"
/sbin/rpcbind -w
fi
mount -t nfsd nfds /proc/fs/nfsd
# -V 3: enable NFSv3
/usr/sbin/rpc.mountd -N 2 -V 3
/usr/sbin/exportfs -r
# -G 10 to reduce grace time to 10 seconds (the lowest allowed)
/usr/sbin/rpc.nfsd -G 10 -N 2 -V 3
/sbin/rpc.statd --no-notify
echo "NFS started"
}
function stop()
{
echo "Stopping NFS"
/usr/sbin/rpc.nfsd 0
/usr/sbin/exportfs -au
/usr/sbin/exportfs -f
kill $( pidof rpc.mountd )
umount /proc/fs/nfsd
echo > /etc/exports
exit 0
}
trap stop TERM
start "$@"
# Ugly hack to do nothing and wait for SIGTERM
while true; do
sleep 5
done

View File

@@ -1,20 +0,0 @@
# How to become a contributor and submit your own code
## Contributor License Agreements
We'd love to accept your patches! Before we can take them, we have to jump a couple of legal hurdles.
Please fill out either the individual or corporate Contributor License Agreement (CLA).
* If you are an individual writing original source code and you're sure you own the intellectual property, then you'll need to sign an [individual CLA](http://code.google.com/legal/individual-cla-v1.0.html).
* If you work for a company that wants to allow you to contribute your work, then you'll need to sign a [corporate CLA](http://code.google.com/legal/corporate-cla-v1.0.html).
Follow either of the two links above to access the appropriate CLA and instructions for how to sign and return it. Once we receive it, we'll be able to accept your pull requests.
## Contributing A Patch
1. Submit an issue describing your proposed change to the repo in question.
1. The repo owner will respond to your issue promptly.
1. If your proposed change is accepted, and you haven't already done so, sign a Contributor License Agreement (see details above).
1. Fork the desired repo, develop and test your code changes.
1. Submit a pull request.

View File

@@ -1,11 +1,4 @@
nfs-server-docker
============
Dockerfile source for nfs-server [docker](https://docker.io) image.
# Upstream
This source repo was originally based on:
https://github.com/kubernetes/kubernetes/tree/master/test/images/volume/nfs
# Disclaimer
This is not an official Google product.
## This repository was moved to [Click-to-Deploy repo](https://github.com/GoogleCloudPlatform/click-to-deploy/tree/master/docker/nfs-server).

View File

@@ -1,39 +0,0 @@
# Copyright 2016 The Kubernetes Authors.
# Copyright 2018 Google LLC
#
# 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.
FROM {{ .From }}
{{- $nfs := index .Packages "nfs-server" }}
{{- $c2dRelease := index .TemplateArgs "c2dRelease" }}
ENV NFS_VERSION {{ $nfs.Version }}
ENV C2D_RELEASE {{ $c2dRelease }}
RUN set -x && \
apt-get update && apt-get install -qq -y openssl nfs-kernel-server=${NFS_VERSION}* && \
rm -rf /var/lib/apt/lists/* && \
mkdir /exports
COPY docker-entrypoint.sh /usr/local/bin/
RUN chmod +rx /usr/local/bin/docker-entrypoint.sh
VOLUME /exports
EXPOSE 2049/tcp
EXPOSE 20048/tcp
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
CMD ["/exports"]

View File

@@ -1,79 +0,0 @@
#!/bin/bash
# Copyright 2015 The Kubernetes Authors.
# Copyright 2018 Google LLC
#
# 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.
function start()
{
unset gid
# accept "-G gid" option
while getopts "G:" opt; do
case ${opt} in
G) gid=${OPTARG};;
esac
done
shift $(($OPTIND - 1))
# prepare /etc/exports
for i in "$@"; do
# fsid=0: needed for NFSv4
echo "$i *(rw,fsid=0,sync,no_subtree_check,no_root_squash)" >> /etc/exports
if [ -v gid ] ; then
chmod 070 $i
chgrp $gid $i
fi
echo "Serving $i"
done
# start rpcbind if it is not started yet
/usr/sbin/rpcinfo 127.0.0.1 > /dev/null; s=$?
if [ $s -ne 0 ]; then
echo "Starting rpcbind"
/sbin/rpcbind -w
fi
mount -t nfsd nfds /proc/fs/nfsd
# -V 3: enable NFSv3
/usr/sbin/rpc.mountd -N 2 -V 3
/usr/sbin/exportfs -r
# -G 10 to reduce grace time to 10 seconds (the lowest allowed)
/usr/sbin/rpc.nfsd -G 10 -N 2 -V 3
/sbin/rpc.statd --no-notify
echo "NFS started"
}
function stop()
{
echo "Stopping NFS"
/usr/sbin/rpc.nfsd 0
/usr/sbin/exportfs -au
/usr/sbin/exportfs -f
kill $( pidof rpc.mountd )
umount /proc/fs/nfsd
echo > /etc/exports
exit 0
}
trap stop TERM
start "$@"
# Ugly hack to do nothing and wait for SIGTERM
while true; do
sleep 5
done

View File

@@ -1,40 +0,0 @@
# Copyright 2024 Google LLC
#
# 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.
_variables:
from: &from marketplace.gcr.io/google/debian11
cloudbuild:
docker_image: gcr.io/cloud-builders/docker:24.0.9
enable_parallel: false
versions:
- dir: '1/debian11/1.3'
repo: nfs-server1
annotations:
- key: com.googleapis.cloudmarketplace.product.service.name
value: services/ffece19b-8fdf-4cc5-b916-9d55e27926ef.cloudpartnerservices.goog
tags:
- '1.3.4-debian11'
- '1.3-debian11'
- '1-debian11'
- '1.3.4'
- '1.3'
- '1'
- 'latest'
templateArgs:
c2dRelease: '1.3.4'
from: *from
packages:
nfs-server:
version: 1:1.3.4-6