Skip to content

Commit

Permalink
Merge pull request #35 from startechnica:st-common
Browse files Browse the repository at this point in the history
[st-common] Release v0.1.3
  • Loading branch information
firmansyahn authored Jul 8, 2023
2 parents 51436b2 + fc4698c commit 4e20c02
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
6 changes: 3 additions & 3 deletions charts/common/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ annotations:
category: Infrastructure
artifacthub.io/changes: |
- kind: changed
description: Rename chart name from "common" to "st-common"
description: Add Kubernetes Gateway API
apiVersion: v2
appVersion: 0.1.2
appVersion: 0.1.3
description: A Library Helm Chart for grouping common logic between Startechnica charts.
This chart is not deployable by itself.
home: https://github.com/startechnica/apps/tree/main/charts/common
Expand All @@ -23,4 +23,4 @@ name: st-common
sources:
- https://startechnica.github.io/apps
type: library
version: 0.1.2
version: 0.1.3
6 changes: 3 additions & 3 deletions charts/common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ A [Helm Library Chart](https://helm.sh/docs/topics/library_charts/#helm) for gro

```yaml
dependencies:
- name: common
version: x.x.x
- name: st-common
version: "*"
repository: https://startechnica.github.io/apps
```
Expand Down Expand Up @@ -47,7 +47,7 @@ The following table lists the helpers available in the library which are scoped
## Example of use

```yaml
{{- if not (eq (include "common.capabilities.istioNetworking.apiVersion" .) "false") }}
{{- if (include "common.capabilities.istioNetworking.apiVersion" .) }}
apiVersion: {{ include "common.capabilities.istioNetworking.apiVersion" . }}
kind: Gateway
metadata:
Expand Down
4 changes: 3 additions & 1 deletion charts/common/templates/_istio.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@

{{/* Return the appropriate apiVersion for Istio Security. */}}
{{- define "common.capabilities.istioSecurity.apiVersion" -}}
{{- if .Capabilities.APIVersions.Has "security.istio.io/v1beta1" -}}
{{- if .Capabilities.APIVersions.Has "security.istio.io/v1" -}}
{{- print "security.istio.io/v1" -}}
{{- else if .Capabilities.APIVersions.Has "security.istio.io/v1beta1" -}}
{{- print "security.istio.io/v1beta1" -}}
{{- else -}}
{{- false -}}
Expand Down
8 changes: 8 additions & 0 deletions charts/common/templates/_sigs.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{{/* Return the appropriate apiVersion for Kubernetes Gateway API */}}
{{- define "common.capabilities.networkingGateway.apiVersion" -}}
{{- if .Capabilities.APIVersions.Has "gateway.networking.k8s.io/v1beta1" -}}
{{- print "gateway.networking.k8s.io/v1beta1" -}}
{{- else -}}
{{- false -}}
{{- end -}}
{{- end -}}

0 comments on commit 4e20c02

Please sign in to comment.