Skip to content

Commit

Permalink
adding release 2.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
djkormo committed Nov 12, 2023
1 parent ee08a0e commit c641cb1
Show file tree
Hide file tree
Showing 68 changed files with 4,069 additions and 4,071 deletions.
252 changes: 126 additions & 126 deletions .devcontainer/test-on-create.sh
Original file line number Diff line number Diff line change
@@ -1,127 +1,127 @@
#!/bin/bash

set -u

set -e

KUBERNETES_VERSION=v1.22.10
GO_VERSION=1.17.8
OPERATOR_SDK_VERSION=v1.19.x




sudo apt-get update
sudo apt-get install snap


# uninstall existing golang

sudo rm -rvf /usr/local/go/

# install go GO_VERSION


VERSION=${GO_VERSION} # go version
ARCH="amd64" # go architecture
curl -O -L "https://golang.org/dl/go${VERSION}.linux-${ARCH}.tar.gz"
ls -l

#Extract the tarball using the tar command:

sudo tar -xf "go${VERSION}.linux-${ARCH}.tar.gz"
ls -l
cd go/
ls -l
cd ..


#Set up the permissions using the chown command/chmod command:
sudo chown -R root:root ./go

sudo rm -f -R /usr/local/go

sudo mv -v go /usr/local

rm -f go*.tar.gz

cd ~


# Kustomize

curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash

chmod a+x kustomize
sudo mv kustomize /usr/local/bin/kustomize



# Kubebuilder

cd ~

curl -L -o kubebuilder https://go.kubebuilder.io/dl/latest/$(go env GOOS)/$(go env GOARCH)
sudo chmod +x kubebuilder && sudo mv kubebuilder /usr/local/bin/kubebuilder

# Operator SDK

git clone https://github.com/operator-framework/operator-sdk
cd operator-sdk
git checkout ${OPERATOR_SDK_VERSION}
make install

cd ~

rm -fr operator-sdk

# Kubernetes staff

alias k='kubectl'
alias kubectx='kubectl config use-context '
alias kubens='kubectl config set-context --current --namespace '


# krew plugins

(
set -x; cd "$(mktemp -d)" &&
OS="$(uname | tr '[:upper:]' '[:lower:]')" &&
ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')" &&
KREW="krew-${OS}_${ARCH}" &&
curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/${KREW}.tar.gz" &&
tar zxvf "${KREW}.tar.gz" &&
./"${KREW}" install krew
)

#Add the $HOME/.krew/bin directory to your PATH environment variable. To do this, update your .bashrc or .zshrc file and append the following line:

export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"


kubectl krew install split-yaml
kubectl krew install neat
kubectl krew install prune-unused

kubectl krew list

echo "Component Versions"
kustomize version
kubebuilder version
operator-sdk version
helm version

minikube start -p aged --kubernetes-version=${KUBERNETES_VERSION}

kubectl get nodes -o wide


code --install-extension redhat.vscode-yaml --force
code --install-extension ms-kubernetes-tools.vscode-kubernetes-tools --force

code --install-extension golang.Go --force
code --install-extension 766b.go-outliner --force

code --install-extension mhutchie.git-graph --force

#!/bin/bash

set -u

set -e

KUBERNETES_VERSION=v1.22.10
GO_VERSION=1.17.8
OPERATOR_SDK_VERSION=v1.19.x




sudo apt-get update
sudo apt-get install snap


# uninstall existing golang

sudo rm -rvf /usr/local/go/

# install go GO_VERSION


VERSION=${GO_VERSION} # go version
ARCH="amd64" # go architecture
curl -O -L "https://golang.org/dl/go${VERSION}.linux-${ARCH}.tar.gz"
ls -l

#Extract the tarball using the tar command:

sudo tar -xf "go${VERSION}.linux-${ARCH}.tar.gz"
ls -l
cd go/
ls -l
cd ..


#Set up the permissions using the chown command/chmod command:
sudo chown -R root:root ./go

sudo rm -f -R /usr/local/go

sudo mv -v go /usr/local

rm -f go*.tar.gz

cd ~


# Kustomize

curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash

chmod a+x kustomize
sudo mv kustomize /usr/local/bin/kustomize



# Kubebuilder

cd ~

curl -L -o kubebuilder https://go.kubebuilder.io/dl/latest/$(go env GOOS)/$(go env GOARCH)
sudo chmod +x kubebuilder && sudo mv kubebuilder /usr/local/bin/kubebuilder

# Operator SDK

git clone https://github.com/operator-framework/operator-sdk
cd operator-sdk
git checkout ${OPERATOR_SDK_VERSION}
make install

cd ~

rm -fr operator-sdk

# Kubernetes staff

alias k='kubectl'
alias kubectx='kubectl config use-context '
alias kubens='kubectl config set-context --current --namespace '


# krew plugins

(
set -x; cd "$(mktemp -d)" &&
OS="$(uname | tr '[:upper:]' '[:lower:]')" &&
ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')" &&
KREW="krew-${OS}_${ARCH}" &&
curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/${KREW}.tar.gz" &&
tar zxvf "${KREW}.tar.gz" &&
./"${KREW}" install krew
)

#Add the $HOME/.krew/bin directory to your PATH environment variable. To do this, update your .bashrc or .zshrc file and append the following line:

export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"


kubectl krew install split-yaml
kubectl krew install neat
kubectl krew install prune-unused

kubectl krew list

echo "Component Versions"
kustomize version
kubebuilder version
operator-sdk version
helm version

minikube start -p aged --kubernetes-version=${KUBERNETES_VERSION}

kubectl get nodes -o wide


code --install-extension redhat.vscode-yaml --force
code --install-extension ms-kubernetes-tools.vscode-kubernetes-tools --force

code --install-extension golang.Go --force
code --install-extension 766b.go-outliner --force

code --install-extension mhutchie.git-graph --force

echo "done"
118 changes: 59 additions & 59 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,59 @@
# This is a basic workflow to help you get started with Actions

name: CI - ADCS-Issuer

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
tags:
- "v*"

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
name: Build, release and upload assets
runs-on: ubuntu-latest
steps:
- name: Set up GO
uses: actions/setup-go@v1
with:
go-version: 1.13

- name: Checkout code
uses: actions/checkout@master

- name: Get the version from tag
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}

- name: Build
run: |
export GOBIN=$(pwd)/bin
export PATH=$PATH:$GOBIN
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager-$VERSION-linux-amd64 main.go
echo manager-$VERSION
env:
VERSION: ${{ steps.get_version.outputs.VERSION }}

- name: Create release
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Upload linux-amd64
id: upload_release_asset_linux
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./manager-${{ steps.get_version.outputs.VERSION }}-linux-amd64
asset_name: manager-${{ steps.get_version.outputs.VERSION }}-linux-amd64
asset_content_type: application/octet-stream
# This is a basic workflow to help you get started with Actions

name: CI - ADCS-Issuer

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
tags:
- "v*"

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
name: Build, release and upload assets
runs-on: ubuntu-latest
steps:
- name: Set up GO
uses: actions/setup-go@v1
with:
go-version: 1.13

- name: Checkout code
uses: actions/checkout@master

- name: Get the version from tag
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}

- name: Build
run: |
export GOBIN=$(pwd)/bin
export PATH=$PATH:$GOBIN
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager-$VERSION-linux-amd64 main.go
echo manager-$VERSION
env:
VERSION: ${{ steps.get_version.outputs.VERSION }}

- name: Create release
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Upload linux-amd64
id: upload_release_asset_linux
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./manager-${{ steps.get_version.outputs.VERSION }}-linux-amd64
asset_name: manager-${{ steps.get_version.outputs.VERSION }}-linux-amd64
asset_content_type: application/octet-stream
Loading

0 comments on commit c641cb1

Please sign in to comment.