Compare commits
5
Commits
v1.17.0-rc2
...
v1.17.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b36e0516f4 | ||
|
|
121f962399 | ||
|
|
58f33d6f6c | ||
|
|
61f4d4f5ad | ||
|
|
dc4c6e20e3 |
@@ -49,12 +49,32 @@ jobs:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Install Cosign
|
||||
uses: sigstore/cosign-installer@main
|
||||
with:
|
||||
cosign-release: 'v1.12.0'
|
||||
- name: Check cosign install!
|
||||
run: cosign version
|
||||
|
||||
- name: Write cosign signing key to disk
|
||||
run: 'echo "$KEY" > cosign.key'
|
||||
shell: bash
|
||||
env:
|
||||
KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}
|
||||
|
||||
- name: Generate yaml for manifest, Minikube and Openshift installation
|
||||
run: ${GITHUB_WORKSPACE}/hack/build-yaml.sh $VERSION
|
||||
env:
|
||||
VERSION: ${{ steps.get_version.outputs.VERSION }}
|
||||
shell: bash
|
||||
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v3
|
||||
with:
|
||||
version: latest
|
||||
args: release
|
||||
env:
|
||||
COSIGN_PWD: ${{ secrets.COSIGN_PWD }}
|
||||
GORELEASER_CURRENT_TAG: ${{ steps.get_version.outputs.VERSION }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
DOCKER_CLI_EXPERIMENTAL: "enabled"
|
||||
|
||||
@@ -35,3 +35,5 @@ dist/
|
||||
manifest/
|
||||
.vscode/
|
||||
coverage.txt
|
||||
|
||||
cosign.key
|
||||
|
||||
@@ -267,3 +267,29 @@ archives:
|
||||
checksum:
|
||||
name_template: "checksums.txt"
|
||||
algorithm: sha256
|
||||
|
||||
# signs the checksum file
|
||||
# https://goreleaser.com/customization/sign
|
||||
signs:
|
||||
- cmd: cosign
|
||||
artifacts: all
|
||||
stdin: '{{ .Env.COSIGN_PWD }}'
|
||||
output: true
|
||||
args:
|
||||
- sign-blob
|
||||
- '--key=cosign.key'
|
||||
- '--output-certificate=${certificate}'
|
||||
- '--output-signature=${signature}'
|
||||
- '${artifact}'
|
||||
|
||||
# signs our docker image
|
||||
# https://goreleaser.com/customization/docker_sign
|
||||
docker_signs:
|
||||
- cmd: cosign
|
||||
artifacts: all
|
||||
stdin: '{{ .Env.COSIGN_PWD }}'
|
||||
output: true
|
||||
args:
|
||||
- 'sign'
|
||||
- '--key=cosign.key'
|
||||
- '${artifact}'
|
||||
@@ -1,7 +1,7 @@
|
||||
apiVersion: v2
|
||||
name: fission-all
|
||||
version: v1.17.0-rc2
|
||||
appVersion: v1.17.0-rc2
|
||||
version: v1.17.0
|
||||
appVersion: v1.17.0
|
||||
description: Fission is a fast serverless framework for Kubernetes.
|
||||
home: https://fission.io/
|
||||
icon: https://fission.io/images/fission-logo-white.svg
|
||||
|
||||
@@ -6,10 +6,10 @@ apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ printf "%s-%s" $.Chart.Name $filename | trunc 63 | trimSuffix "-" }}
|
||||
namespace: {{ $.grafana.Namespace }}
|
||||
namespace: {{ $.Values.grafana.namespace }}
|
||||
labels:
|
||||
grafana_dashboard: "1"
|
||||
created_by: "{{ .Chart.Name }}"
|
||||
created_by: "{{ $.Chart.Name }}"
|
||||
data:
|
||||
{{ base $path }}: '{{ $files.Get $path }}'
|
||||
---
|
||||
|
||||
@@ -25,7 +25,7 @@ image: fission/fission-bundle
|
||||
## It is also used by the chart to identify version of the few more images apart from fission-bundle.
|
||||
## Keep it empty for using latest tag.
|
||||
##
|
||||
imageTag: v1.17.0-rc2
|
||||
imageTag: v1.17.0
|
||||
|
||||
## pullPolicy represents the pull policy to use for images in the chart.
|
||||
##
|
||||
@@ -92,7 +92,7 @@ fetcher:
|
||||
## image represents the image of the fetcher component.
|
||||
image: fission/fetcher
|
||||
## imageTag represents the tag of the image of the fetcher component.
|
||||
imageTag: v1.17.0-rc2
|
||||
imageTag: v1.17.0
|
||||
|
||||
## Fetcher is only for to downloading or uploading archive.
|
||||
## Normally, you don't need to change the value here, unless necessary.
|
||||
@@ -607,7 +607,7 @@ preUpgradeChecks:
|
||||
image: fission/pre-upgrade-checks
|
||||
## pre-install/pre-upgrade checks image version
|
||||
##
|
||||
imageTag: v1.17.0-rc2
|
||||
imageTag: v1.17.0
|
||||
|
||||
## Fission post-install/post-upgrade reporting live in this image
|
||||
##
|
||||
|
||||
Executable
+55
@@ -0,0 +1,55 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
DIR=${GITHUB_WORKSPACE}
|
||||
MANIFESTDIR=${GITHUB_WORKSPACE}/manifest
|
||||
CHARTPATH=${GITHUB_WORKSPACE}/charts/fission-all
|
||||
|
||||
source $(realpath "${DIR}"/test/init_tools.sh)
|
||||
doit() {
|
||||
echo "! $*"
|
||||
"$@"
|
||||
}
|
||||
|
||||
build_yamls() {
|
||||
local version=$1
|
||||
|
||||
mkdir -p "${MANIFESTDIR}"/yamls
|
||||
releaseName=fission-$(echo "${version}" | sed 's/\./-/g')
|
||||
|
||||
cd $CHARTPATH
|
||||
doit helm dependency update
|
||||
cd $GITHUB_WORKSPACE
|
||||
|
||||
echo "Release name", "$releaseName"
|
||||
cmdprefix="helm template ${releaseName} ${CHARTPATH} --namespace fission --validate"
|
||||
|
||||
# for minikube and other environments that don't support LoadBalancer
|
||||
command="$cmdprefix --set analytics=false,analyticsNonHelmInstall=true,serviceType=NodePort,routerServiceType=NodePort"
|
||||
echo "$command"
|
||||
$command >"$MANIFESTDIR/yamls/fission-all-${version}"-minikube.yaml
|
||||
|
||||
# for environments that support LoadBalancer
|
||||
command="$cmdprefix --set analytics=false,analyticsNonHelmInstall=true"
|
||||
echo "$command"
|
||||
$command >"$MANIFESTDIR/yamls/fission-all-${version}".yaml
|
||||
|
||||
# for OpenShift
|
||||
command="$cmdprefix --set analytics=false,analyticsNonHelmInstall=true,logger.enableSecurityContext=true"
|
||||
echo "$command"
|
||||
$command >"$MANIFESTDIR/yamls/fission-all-${version}"-openshift.yaml
|
||||
|
||||
}
|
||||
|
||||
|
||||
version=$1
|
||||
if [ -z "$version" ]; then
|
||||
echo "Release version not mentioned"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Current version for release: $version"
|
||||
|
||||
build_yamls "$version"
|
||||
@@ -100,6 +100,15 @@ func (ch MqtConsumerGroupHandler) Cleanup(session sarama.ConsumerGroupSession) e
|
||||
|
||||
// ConsumeClaims implemented to satisfy the sarama.ConsumerGroupHandler interface
|
||||
func (ch MqtConsumerGroupHandler) ConsumeClaim(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error {
|
||||
|
||||
trigger := ch.trigger.Name
|
||||
triggerNamespace := ch.trigger.Namespace
|
||||
topic := claim.Topic()
|
||||
partition := string(claim.Partition())
|
||||
|
||||
// initially set metrics to -1
|
||||
mqtrigger.SetMessageLagCount(trigger, triggerNamespace, topic, partition, -1)
|
||||
|
||||
// Do not move the code below to a goroutine.
|
||||
// The `ConsumeClaim` itself is called within a goroutine
|
||||
for {
|
||||
@@ -108,8 +117,12 @@ func (ch MqtConsumerGroupHandler) ConsumeClaim(session sarama.ConsumerGroupSessi
|
||||
if msg != nil {
|
||||
ch.kafkaMsgHandler(msg)
|
||||
session.MarkMessage(msg, "")
|
||||
mqtrigger.IncreaseMessageCount(ch.trigger.Name, ch.trigger.Namespace)
|
||||
mqtrigger.IncreaseMessageCount(trigger, triggerNamespace)
|
||||
}
|
||||
|
||||
mqtrigger.SetMessageLagCount(trigger, triggerNamespace, topic, partition,
|
||||
claim.HighWaterMarkOffset()-msg.Offset-1)
|
||||
|
||||
// Should return when `session.Context()` is done.
|
||||
case <-session.Context().Done():
|
||||
return nil
|
||||
|
||||
@@ -37,6 +37,13 @@ var (
|
||||
},
|
||||
labels,
|
||||
)
|
||||
messageLagCount = promauto.NewGaugeVec(
|
||||
prometheus.GaugeOpts{
|
||||
Name: "fission_mqt_message_lag",
|
||||
Help: "Total number of messages lag per topic and partition",
|
||||
},
|
||||
[]string{"trigger_name", "trigger_namespace", "topic", "partition"},
|
||||
)
|
||||
)
|
||||
|
||||
func IncreaseSubscriptionCount() {
|
||||
@@ -50,3 +57,7 @@ func DecreaseSubscriptionCount() {
|
||||
func IncreaseMessageCount(trigname, trignamespace string) {
|
||||
messageCount.WithLabelValues(trigname, trignamespace).Inc()
|
||||
}
|
||||
|
||||
func SetMessageLagCount(trigname, trignamespace, topic, partition string, lag int64) {
|
||||
messageLagCount.WithLabelValues(trigname, trignamespace, topic, partition).Set(float64(lag))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user