Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ingress-base #124

Merged
merged 1 commit into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflows/ingress-base.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: ingress-base
permissions:
contents: read

on:
push:
branches: [ ingress-base ]
workflow_dispatch:

env:
REPO: kubernetes/ingress-nginx
Version: "1.21" # ingress build script
PROJECT: ingress-nginx
BRANCH: controller-v1.9.6 # should compatibe with env.Version
REGISTRY_NAME: "docker.io"
REGISTRY_USER: "${{ secrets.DOCKER_HUB_USER }}"
REGISTRY_PASS: "${{ secrets.DOCKER_HUB_PASSWORD }}"

jobs:
build:
name: Build
runs-on: ubuntu-22.04 #[self-hosted, linux, x64]
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Check out repo code
uses: actions/checkout@v4

- name: Check out build code
uses: actions/checkout@v4
with:
repository: ${{ env.REPO }}
ref: ${{ env.BRANCH }}
path: ${{ env.PROJECT }}

- name: Login to Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY_NAME }}
username: ${{ env.REGISTRY_USER }}
password: ${{ env.REGISTRY_PASS }}

- name: Image Build And Push
shell: bash
run: |
set -ex
# 覆盖默认build.sh, 支持 sm 密码 ssl 库
cp -f ingress/build-${{ env.Version }}.sh ${{ env.PROJECT }}/images/nginx/rootfs/build.sh

# 删除 openssl 相关
sed -i '/openssl/d' ${{ env.PROJECT }}/images/nginx/rootfs/Dockerfile

# build
cd ${{ env.PROJECT }}/images/nginx/rootfs
docker buildx build \
--no-cache \
--platform linux/amd64 \
--output "type=image,push=true" \
--tag yylt/nginx:latest \
--tag yylt/nginx:${{ env.Version }} \
--file ./Dockerfile ./
62 changes: 0 additions & 62 deletions .github/workflows/nginx-base.yaml

This file was deleted.

39 changes: 39 additions & 0 deletions examples/sts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: test
spec:
selector:
matchLabels:
app: test
template:
metadata:
labels:
app: test
spec:
nodeSelector:
kubernetes.io/hostname: node-1
tolerations:
- effect: NoExecute
key: node.kubernetes.io/not-ready
operator: Exists
tolerationSeconds: 2
- effect: NoExecute
key: node.kubernetes.io/unreachable
operator: Exists
tolerationSeconds: 2
containers:
- image: nginx:latest
imagePullPolicy: IfNotPresent
name: test
---
apiVersion: v1
kind: Service
metadata:
name: test
spec:
ports:
- port: 80
selector:
app: test
---
Loading
Loading