Skip to content

Commit

Permalink
Add docker push
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuCesbron committed Feb 5, 2024
1 parent 1e60abe commit 25ee0fc
Show file tree
Hide file tree
Showing 6 changed files with 119 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release Charts
name: Release helm chart to github

on:
push:
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/image-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build and push docker image to github

# on:
# push:
# branches:
# - main

on:
push:
tags:
- *

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@main

- name: 'Login to GitHub Container Registry'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}

- name: 'Build Inventory Image'
run: |
# VERSION =
echo ${GITHUB_REF#refs/tags/}
make docker-build
make docker-push
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
VERSION ?= 0.0.1
IMG ?= immudb-operator-controller:${VERSION}
IMG ?= ghcr.io/unagex/immmudb-operator/controller:${VERSION}

OPERATOR_SDK_VERSION ?= v1.33.0

Expand Down
3 changes: 1 addition & 2 deletions charts/operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ spec:
- name: {{ .Chart.Name }}
image: {{ .Values.operator.image.repository }}:{{ .Values.operator.image.tag | default .Chart.AppVersion }}
imagePullPolicy: {{ .Values.operator.image.pullPolicy }}
resources: {{ toYaml .Values.operator.resources | nindent 12 }}

resources: {{ toYaml .Values.operator.resources | nindent 12 }}
2 changes: 1 addition & 1 deletion charts/operator/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
operator:
image:
repository: immudb-operator-controller
repository: ghcr.io/unagex/immmudb-operator/controller
# tag default to .Chart.AppVersion if not set
tag: ""
pullPolicy: IfNotPresent
Expand Down
79 changes: 79 additions & 0 deletions helm/crd/immudb.io_immudbs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
name: immudbs.immudb.io
spec:
group: immudb.io
names:
kind: Immudb
listKind: ImmudbList
plural: immudbs
singular: immudb
scope: Namespaced
versions:
- name: v1
schema:
openAPIV3Schema:
description: Immudb is the Schema for the immudbs API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: ImmudbSpec defines the desired state of Immudb
properties:
image:
default: codenotary/immudb:latest
description: The image name to use for PostgreSQL containers.
type: string
imagePullPolicy:
description: ImagePullPolicy is used to determine when Kubernetes
will attempt to pull (download) container images.
enum:
- Always
- Never
- IfNotPresent
type: string
replicas:
description: Number of desired immudb pods. At the moment, you can
just have 1 replica of immudb. We are working to raise that limit.
format: int32
maximum: 1
minimum: 1
type: integer
required:
- replicas
type: object
status:
description: ImmudbStatus defines the observed state of Immudb
properties:
ready:
description: Instance ready to accept connections
type: boolean
readyReplicas:
description: Number of ready replicas
format: int32
type: integer
required:
- ready
- readyReplicas
type: object
required:
- spec
type: object
served: true
storage: true
subresources:
status: {}

0 comments on commit 25ee0fc

Please sign in to comment.