Skip to content

Commit

Permalink
Replace for_k8s_version with for_kueue_version
Browse files Browse the repository at this point in the history
  • Loading branch information
ivange94 committed Jul 9, 2024
1 parent 41f417d commit eeeefa5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions site/layouts/shortcodes/feature-state.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@

{{ $valid_states := "alpha, beta, deprecated, stable" }}
{{ $project := .Get "project" | default "Kueue" }}
{{ $state := .Get "state" }}
{{ $for_k8s_version := .Get "for_k8s_version" | default (.Page.Param "version")}}
{{ $for_kueue_version := .Get "for_kueue_version" | default (.Page.Param "version")}}
{{ $is_valid := strings.Contains $valid_states $state }}

{{ if not $is_valid }}
{{ errorf "%q is not a valid feature-state, use one of %q" $state $valid_states }}
{{ else }}
<div class="feature-state-notice feature-{{ $state }}">
<span class="feature-state-name">FEATURE STATE</span> <code>Kubernetes {{ $for_k8s_version }} [{{ $state }}]</code>
<span class="feature-state-name">FEATURE STATE</span> <code>{{ $project }} {{ $for_kueue_version }} [{{ $state }}]</code>
</div>
{{ end }}

0 comments on commit eeeefa5

Please sign in to comment.