mirror of https://github.com/istio/istio.io.git
More base release 1.6 stuff - Get pipeline working again (#6769)
* More base release 1.6 stuff * Add 1.6.x to spelling * Fix some broken links with sidecar/tls-check being removed * Fix links pointing to install/kubernetes/helm/... * Incorporate #6783 - Fix bug requiring placeholder release notes * Restore some links to archive * Fix one remainging link to archive * Someone still pointing to current release upgrade notes. Remove.
This commit is contained in:
parent
f536af066b
commit
fb50276d14
|
|
@ -81,7 +81,7 @@ Otherwise, the mode defaults to `DISABLE` causing client proxy sidecars to make
|
|||
instead of TLS encrypted requests. Thus, the requests conflict with the server proxy because the server proxy expects
|
||||
encrypted requests.
|
||||
|
||||
To confirm there is a conflict, check whether the `STATUS` field in the output of the [`istioctl authn tls-check`](/docs/reference/commands/istioctl/#istioctl-authn-tls-check) command
|
||||
To confirm there is a conflict, check whether the `STATUS` field in the output of the [`istioctl authn tls-check`](/docs/reference/commands/istioctl/#istioctl-experimental-authz-check) command
|
||||
is set to `CONFLICT` for your service. For example, a command similar to the following could be used to check
|
||||
for a conflict with the `httpbin` service:
|
||||
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ istio-system tcpkubeattrgenrulerule 4h
|
|||
|
||||
If the output shows no rules named `promhttp` or `promtcp`, then the Mixer configuration for sending metric instances to the Prometheus adapter is missing. You must supply the configuration for rules connecting the Mixer metric instances to a Prometheus handler.
|
||||
|
||||
For reference, please consult the [default rules for Prometheus]({{< github_file >}}/install/kubernetes/helm/istio/charts/mixer/templates/config.yaml).
|
||||
For reference, please consult the [default rules for Prometheus]({{< github_file >}}/manifests/UPDATING-CHARTS.md).
|
||||
|
||||
#### Verify the Prometheus handler configuration exists
|
||||
|
||||
|
|
@ -140,7 +140,7 @@ For reference, please consult the [default rules for Prometheus]({{< github_file
|
|||
|
||||
1. If the output shows no configured Prometheus handlers, you must reconfigure Mixer with the appropriate handler configuration.
|
||||
|
||||
For reference, please consult the [default handler configuration for Prometheus]({{< github_file >}}/install/kubernetes/helm/istio/charts/mixer/templates/config.yaml).
|
||||
For reference, please consult the [default handler configuration for Prometheus]({{< github_file >}}/manifests/UPDATING-CHARTS.md).
|
||||
|
||||
#### Verify Mixer metric instances configuration exists
|
||||
|
||||
|
|
@ -158,7 +158,7 @@ For reference, please consult the [default rules for Prometheus]({{< github_file
|
|||
|
||||
1. If the output shows no configured metric instances, you must reconfigure Mixer with the appropriate instance configuration.
|
||||
|
||||
For reference, please consult the [default instances configuration for metrics]({{< github_file >}}/install/kubernetes/helm/istio/charts/mixer/templates/config.yaml).
|
||||
For reference, please consult the [default instances configuration for metrics]({{< github_file >}}/manifests/UPDATING-CHARTS.md).
|
||||
|
||||
#### Verify there are no known configuration errors
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ weight: 50
|
|||
---
|
||||
|
||||
This page presents details about the metrics that Istio collects when using its initial configuration. You can add and remove metrics by changing configuration at any time, but this
|
||||
is the built-in set. They can be found [here]({{< github_file >}}/install/kubernetes/helm/istio/charts/mixer/templates/config.yaml)
|
||||
is the built-in set. They can be found [here]({{< github_file >}}/manifests/UPDATING-CHARTS.md)
|
||||
under the section with "kind: metric”. It uses [metric
|
||||
template](/docs/reference/config/policy-and-telemetry/templates/metric/) to define these metrics.
|
||||
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ to manage the lifecycle of Istio.
|
|||
If not already defined, create one using following command:
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl apply -f @install/kubernetes/helm/helm-service-account.yaml@
|
||||
$ kubectl apply -f @manifests/UPDATING-CHARTS.md@
|
||||
{{< /text >}}
|
||||
|
||||
1. Install Tiller on your cluster with the service account:
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ please ensure your Istio control plane components and your applications are
|
|||
highly available with multiple replicas.
|
||||
|
||||
{{< warning >}}
|
||||
Be sure to check out the [upgrade notes](/news/releases/{{< istio_version >}}.x/announcing-{{< istio_version >}}/upgrade-notes)
|
||||
Be sure to check out the upgrade notes
|
||||
for a concise list of things you should know before upgrading your deployment to Istio {{< istio_version >}}.
|
||||
{{< /warning >}}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ title: Can I use Prometheus to scrape application metrics with Istio?
|
|||
weight: 90
|
||||
---
|
||||
|
||||
Yes. Istio ships with [configuration for Prometheus]({{< github_file >}}/install/kubernetes/helm/istio/charts/prometheus/templates/configmap.yaml)
|
||||
Yes. Istio ships with [configuration for Prometheus]({{< github_file >}}/manifests/UPDATING-CHARTS.md)
|
||||
that enables collection of application metrics when mutual TLS is enabled or disabled.
|
||||
|
||||
The `kubernetes-pods` job collects application metrics from pods in environments without mutual TLS. The `kubernetes-pods-istio-secure` job collects metrics
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ be configured using [authentication policies](/docs/concepts/security/#authentic
|
|||
|
||||
### `istioctl`
|
||||
|
||||
- Added the [`istioctl authn tls-check`](/docs/reference/commands/istioctl/#istioctl-authn-tls-check) command.
|
||||
- Added the [`istioctl authn tls-check`](https://archive.istio.io/v1.0/docs/reference/commands/istioctl/#istioctl-authn-tls-check) command.
|
||||
|
||||
- Added the [`istioctl proxy-status`](/docs/reference/commands/istioctl/#istioctl-proxy-status) command.
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ aliases:
|
|||
|
||||
- **Added** Access Log Service [ALS](https://www.envoyproxy.io/docs/envoy/latest/api-v2/service/accesslog/v2/als.proto#grpc-access-log-service-als) support for Envoy gRPC.
|
||||
- **Added** a Grafana dashboard for Citadel monitoring.
|
||||
- **Added** [metrics](/docs/reference/commands/sidecar-injector/#metrics) for monitoring the sidecar injector webhook.
|
||||
- **Added** [metrics](https://archive.istio.io/v1.3/docs/reference/commands/sidecar-injector/#metrics) for monitoring the sidecar injector webhook.
|
||||
- **Added** control plane metrics to monitor Istio's configuration state.
|
||||
- **Added** telemetry reporting for traffic destined to the `Passthrough` and `BlackHole` clusters.
|
||||
- **Added** alpha support for in-proxy generation of service metrics using Prometheus.
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ weight: 10
|
|||
## `istioctl`
|
||||
|
||||
- **Added** the [`istioctl proxy-config logs`](/docs/reference/commands/istioctl/#istioctl-proxy-config-log) sub-command retrieve and update Envoy logging levels.
|
||||
- **Updated** the [`istioctl authn tls-check`](/docs/reference/commands/istioctl/#istioctl-authn-tls-check) sub-command to display which policy is in use.
|
||||
- **Updated** the [`istioctl authn tls-check`](https://archive.istio.io/v1.4/docs/reference/commands/istioctl/#istioctl-authn-tls-check) sub-command to display which policy is in use.
|
||||
- **Added** the experimental [`istioctl experimental wait`](/docs/reference/commands/istioctl/#istioctl-experimental-wait) sub-command to have Istio wait until it has pushed a configuration to all Envoy sidecars.
|
||||
- **Added** the experimental [`istioctl experimental multicluster`](/docs/reference/commands/istioctl/#istioctl-experimental-multicluster) sub-command to help manage Istio across multiple clusters.
|
||||
- **Added** the experimental [`istioctl experimental post-install webhook`](/docs/reference/commands/istioctl/#istioctl-experimental-post-install-webhook) sub-command to [securely manage webhook configurations](/blog/2019/webhook/).
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
---
|
||||
title: 1.6.x Releases
|
||||
description: Announcements for the 1.6 release and its associated patch releases.
|
||||
weight: 23
|
||||
list_by_publishdate: true
|
||||
layout: release-grid
|
||||
decoration: dot
|
||||
---
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
---
|
||||
title: Announcing Istio 1.6
|
||||
linktitle: 1.6
|
||||
subtitle: Major Update
|
||||
description: Istio 1.6 release announcement.
|
||||
publishdate: 2020-03-05
|
||||
release: 1.6.0
|
||||
skip_list: true
|
||||
aliases:
|
||||
- /news/announcing-1.6.0
|
||||
- /news/announcing-1.6
|
||||
---
|
||||
|
||||
We are pleased to announce the release of Istio 1.6!
|
||||
|
||||
{{< relnote >}}
|
||||
|
||||
TBD
|
||||
|
|
@ -75,7 +75,7 @@ istio-system tcpkubeattrgenrulerule 4h
|
|||
|
||||
If the output shows no rules named `promhttp` or `promtcp`, then the Mixer configuration for sending metric instances to the Prometheus adapter is missing. You must supply the configuration for rules connecting the Mixer metric instances to a Prometheus handler.
|
||||
|
||||
For reference, please consult the [default rules for Prometheus]({{< github_file >}}/install/kubernetes/helm/istio/charts/mixer/templates/config.yaml).
|
||||
For reference, please consult the [default rules for Prometheus]({{< github_file >}}/manifests/UPDATING-CHARTS.md).
|
||||
|
||||
### Verify the Prometheus handler configuration exists
|
||||
|
||||
|
|
@ -98,7 +98,7 @@ For reference, please consult the [default rules for Prometheus]({{< github_file
|
|||
|
||||
1. If the output shows no configured Prometheus handlers, you must reconfigure Mixer with the appropriate handler configuration.
|
||||
|
||||
For reference, please consult the [default handler configuration for Prometheus]({{< github_file >}}/install/kubernetes/helm/istio/charts/mixer/templates/config.yaml).
|
||||
For reference, please consult the [default handler configuration for Prometheus]({{< github_file >}}/manifests/UPDATING-CHARTS.md).
|
||||
|
||||
### Verify Mixer metric instances configuration exists
|
||||
|
||||
|
|
@ -116,7 +116,7 @@ For reference, please consult the [default rules for Prometheus]({{< github_file
|
|||
|
||||
1. If the output shows no configured metric instances, you must reconfigure Mixer with the appropriate instance configuration.
|
||||
|
||||
For reference, please consult the [default instances configuration for metrics]({{< github_file >}}/install/kubernetes/helm/istio/charts/mixer/templates/config.yaml).
|
||||
For reference, please consult the [default instances configuration for metrics]({{< github_file >}}/manifests/UPDATING-CHARTS.md).
|
||||
|
||||
### Verify there are no known configuration errors
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ weight: 50
|
|||
---
|
||||
|
||||
This page presents details about the metrics that Istio collects when using its initial configuration. You can add and remove metrics by changing configuration at any time, but this
|
||||
is the built-in set. They can be found [here]({{< github_file >}}/install/kubernetes/helm/istio/charts/mixer/templates/config.yaml)
|
||||
is the built-in set. They can be found [here]({{< github_file >}}/manifests/UPDATING-CHARTS.md)
|
||||
under the section with "kind: metric”. It uses [metric
|
||||
template](/pt-br/docs/reference/config/policy-and-telemetry/templates/metric/) to define these metrics.
|
||||
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ to manage the lifecycle of Istio.
|
|||
If not already defined, create one using following command:
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl apply -f @install/kubernetes/helm/helm-service-account.yaml@
|
||||
$ kubectl apply -f @manifests/UPDATING-CHARTS.md@
|
||||
{{< /text >}}
|
||||
|
||||
1. Install Tiller on your cluster with the service account:
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ please ensure your Istio control plane components and your applications are
|
|||
highly available with multiple replicas.
|
||||
|
||||
{{< warning >}}
|
||||
Be sure to check out the [upgrade notes](/pt-br/news/releases/{{< istio_version >}}.x/announcing-{{< istio_version >}}/upgrade-notes)
|
||||
Be sure to check out the upgrade notes
|
||||
for a concise list of things you should know before upgrading your deployment to Istio {{< istio_version >}}.
|
||||
{{< /warning >}}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ title: Can I use Prometheus to scrape application metrics with Istio?
|
|||
weight: 90
|
||||
---
|
||||
|
||||
Yes. Istio ships with [configuration for Prometheus]({{< github_file >}}/install/kubernetes/helm/istio/charts/prometheus/templates/configmap.yaml)
|
||||
Yes. Istio ships with [configuration for Prometheus]({{< github_file >}}/manifests/UPDATING-CHARTS.md)
|
||||
that enables collection of application metrics when mutual TLS is enabled or disabled.
|
||||
|
||||
The `kubernetes-pods` job collects application metrics from pods in environments without mutual TLS. The `kubernetes-pods-istio-secure` job collects metrics
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ $ kubectl get pods -n istio-system
|
|||
{{< text bash >}}
|
||||
$ helm template install/kubernetes/helm/istio \
|
||||
--namespace istio-system --name istio-remote \
|
||||
--values @install/kubernetes/helm/istio/values-istio-remote.yaml@ \
|
||||
--values @manifests/UPDATING-CHARTS.md@ \
|
||||
--set global.remotePilotAddress=${PILOT_POD_IP} \
|
||||
--set global.remotePolicyAddress=${POLICY_POD_IP} \
|
||||
--set global.remoteTelemetryAddress=${TELEMETRY_POD_IP} > $HOME/istio-remote.yaml
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ istio-system tcpkubeattrgenrulerule 4h
|
|||
|
||||
如果输出没有命名为 `promhttp` 或 `promtcp` 的规则,则缺少将指标实例发送到 Prometheus adapter 的 Mixer 配置。你必须提供将 Mixer 指标实例连接到 Prometheus handler 的规则配置。
|
||||
|
||||
作为参考,请参阅 [Prometheus 的默认规则]({{< github_file >}}/install/kubernetes/helm/istio/charts/mixer/templates/config.yaml)。
|
||||
作为参考,请参阅 [Prometheus 的默认规则]({{< github_file >}}/manifests/UPDATING-CHARTS.md)。
|
||||
|
||||
### 验证 Prometheus handler 配置是否存在{#verify-the-Prometheus-handler-configuration-exists}
|
||||
|
||||
|
|
@ -98,7 +98,7 @@ istio-system tcpkubeattrgenrulerule 4h
|
|||
|
||||
1. 如果输出没有的 Prometheus handler 的配置,则必须重新使用合适的 handler 配置 Mixer。
|
||||
|
||||
有关参考,请参阅 [Prometheus 的默认 handler 配置]({{< github_file >}}/install/kubernetes/helm/istio/charts/mixer/templates/config.yaml)。
|
||||
有关参考,请参阅 [Prometheus 的默认 handler 配置]({{< github_file >}}/manifests/UPDATING-CHARTS.md)。
|
||||
|
||||
### 验证 Mixer 指标实例配置是否存在{#verify-mixer-metric-instances-configuration-exists}
|
||||
|
||||
|
|
@ -116,7 +116,7 @@ istio-system tcpkubeattrgenrulerule 4h
|
|||
|
||||
1. 如果输出未显示已配置的 Mixer 指标实例,则必须使用相应的实例配置重新配置 Mixer。
|
||||
|
||||
有关参考,请参阅 [Mixer 指标的默认实例配置]({{< github_file >}}/install/kubernetes/helm/istio/charts/mixer/templates/config.yaml)。
|
||||
有关参考,请参阅 [Mixer 指标的默认实例配置]({{< github_file >}}/manifests/UPDATING-CHARTS.md)。
|
||||
|
||||
### 验证没有配置错误{#verify-there-are-no-known-configuration-errors}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ description: 通过 Mixer 从 Istio 导出的默认监控指标。
|
|||
weight: 50
|
||||
---
|
||||
|
||||
此页面展示使用初始配置时,Istio 收集的监控指标(metrics)的详细信息。这些指标是内置的,但您可以随时通过更改配置来添加和删除它们。您可以在[这个文件]({{< github_file >}}/install/kubernetes/helm/istio/charts/mixer/templates/config.yaml)的 "kind: metric” 小节中找到它们。它使用了 [metric 模板](/zh/docs/reference/config/policy-and-telemetry/templates/metric/)来定义指标。
|
||||
此页面展示使用初始配置时,Istio 收集的监控指标(metrics)的详细信息。这些指标是内置的,但您可以随时通过更改配置来添加和删除它们。您可以在[这个文件]({{< github_file >}}/manifests/UPDATING-CHARTS.md)的 "kind: metric” 小节中找到它们。它使用了 [metric 模板](/zh/docs/reference/config/policy-and-telemetry/templates/metric/)来定义指标。
|
||||
|
||||
我们将首先描述监控指标,然后描述每个指标的标签。
|
||||
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ $ helm template install/kubernetes/helm/istio --name istio --namespace istio-sys
|
|||
如果还没有定义,请执行下面命令创建:
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl apply -f @install/kubernetes/helm/helm-service-account.yaml@
|
||||
$ kubectl apply -f @manifests/UPDATING-CHARTS.md@
|
||||
{{< /text >}}
|
||||
|
||||
1. 使用 Service Account 在集群上安装 Tiller:
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ keywords: [kubernetes,upgrading]
|
|||
请参阅本指南,以升级使用 Helm 安装的 Istio 控制平面和 sidecar 代理。升级过程可能会安装新的二级制文件,并可能修改配置和 API schema。升级过程可能导致服务停机。为了减少停机时间,请确保 Istio 控制平面组件和应用程序是多副本高可用的。
|
||||
|
||||
{{< warning >}}
|
||||
在将 Istio 版本升级到 {{< istio_version >}} 之前,请务必查看[升级说明](/zh/news/releases/{{< istio_version >}}.x/announcing-{{< istio_version >}}/upgrade-notes)。
|
||||
在将 Istio 版本升级到 {{< istio_version >}} 之前,请务必查看[升级说明]。
|
||||
{{< /warning >}}
|
||||
|
||||
{{< tip >}}
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ keywords: [traffic-management,ingress,sds-credentials]
|
|||
* Gateway 代理能够监视多个密钥/证书对。只需要为每个主机名创建 `Secret` 并更新 Gateway 定义就可以了。
|
||||
|
||||
1. 在 Ingress Gateway 上启用 SDS,并部署 Ingress Gateway 代理。
|
||||
这个功能缺省是禁用的,因此需要在 Helm 中打开 [`istio-ingressgateway.sds.enabled` 开关]({{<github_blob>}}/install/kubernetes/helm/istio/charts/gateways/values.yaml),然后生成 `istio-ingressgateway.yaml` 文件:
|
||||
这个功能缺省是禁用的,因此需要在 Helm 中打开 [`istio-ingressgateway.sds.enabled` 开关]({{<github_blob>}}/manifests/UPDATING-CHARTS.md),然后生成 `istio-ingressgateway.yaml` 文件:
|
||||
|
||||
{{< text bash >}}
|
||||
$ istioctl manifest generate \
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ title: 我可以使用 Prometheus 配合 Istio 抓取应用程序指标吗?
|
|||
weight: 90
|
||||
---
|
||||
|
||||
是的。Istio 附带 [Prometheus 的配置]({{< github_file >}}/install/kubernetes/helm/istio/charts/prometheus/templates/configmap.yaml),在启用或禁用双向 TLS 时启动收集应用程序指标的功能。
|
||||
是的。Istio 附带 [Prometheus 的配置]({{< github_file >}}/manifests/UPDATING-CHARTS.md),在启用或禁用双向 TLS 时启动收集应用程序指标的功能。
|
||||
|
||||
`kubernetes-pods` job 从没有双向 TLS 环境中的 pod 收集应用程序指标。当为 Istio 启用双向 TLS 时,`kubernetes-pods-istio-secure` job 从应用程序的 pod 中收集指标。
|
||||
|
||||
|
|
|
|||
|
|
@ -136,8 +136,9 @@
|
|||
<!-- our own stuff -->
|
||||
<script src="/js/all.min.js" data-manual defer></script>
|
||||
|
||||
|
||||
{{ partial "events.html" (dict "page" . "kind" "sticker") }}
|
||||
{{ partial "header.html" . }}
|
||||
{{ partial "events.html" (dict "page" . "kind" "banner") }}
|
||||
|
||||
{{ block "main" . }}{{ end }}
|
||||
{{ partial "footer.html" . }}
|
||||
|
|
|
|||
|
|
@ -21,69 +21,73 @@
|
|||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $periodStart := $now -}}
|
||||
{{- if eq .Params.period_start "latest_release" -}}
|
||||
{{- $periodStart = $latest_release.PublishDate -}}
|
||||
{{- if and (or (eq .Params.period_start "latest_release") (eq $.Params.link "latest_release")) (not $latest_release) -}}
|
||||
{{/* do nothing */}}
|
||||
{{- else -}}
|
||||
{{- $periodStart = time .Params.period_start -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $periodEnd := $periodStart -}}
|
||||
{{- if .Params.period_duration -}}
|
||||
{{- $periodEnd = $periodStart.AddDate 0 0 .Params.period_duration -}}
|
||||
{{- else -}}
|
||||
{{- $periodEnd = time .Params.period_end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if lt $now $periodEnd -}}
|
||||
|
||||
{{- $periodStart = $periodStart.UTC -}}
|
||||
{{- $periodEnd = $periodEnd.UTC -}}
|
||||
|
||||
{{- if .Params.link -}}
|
||||
{{- $link := .Params.link -}}
|
||||
{{- if eq $link "latest_release" -}}
|
||||
{{ $link = $latest_release.Permalink -}}
|
||||
{{- end -}}
|
||||
|
||||
<a href="{{ $link }}"
|
||||
class="{{ $kind }}"
|
||||
data-title="{{- .Params.title -}} - {{- $periodStart -}}"
|
||||
data-period-start='{{ div $periodStart.UnixNano 1000000 }}'
|
||||
data-period-end='{{ div $periodEnd.UnixNano 1000000 }}'
|
||||
data-max-impressions="{{ .Params.max_impressions }}"
|
||||
data-timeout="{{ .Params.timeout }}">
|
||||
{{- $periodStart := $now -}}
|
||||
{{- if eq .Params.period_start "latest_release" -}}
|
||||
{{- $periodStart = $latest_release.PublishDate -}}
|
||||
{{- else -}}
|
||||
<div
|
||||
class="{{ $kind }}"
|
||||
data-title="{{- .Params.title -}} - {{- $periodStart -}}"
|
||||
data-period-start='{{ div $periodStart.UnixNano 1000000 }}'
|
||||
data-period-end='{{ div $periodEnd.UnixNano 1000000 }}'
|
||||
data-max-impressions="{{ .Params.max_impressions }}"
|
||||
data-timeout="{{ .Params.timeout }}">
|
||||
{{- $periodStart = time .Params.period_start -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if eq $kind "sticker" -}}
|
||||
<div class="left"></div>
|
||||
<div class="right"></div>
|
||||
{{- $periodEnd := $periodStart -}}
|
||||
{{- if .Params.period_duration -}}
|
||||
{{- $periodEnd = $periodStart.AddDate 0 0 .Params.period_duration -}}
|
||||
{{- else -}}
|
||||
{{- $periodEnd = time .Params.period_end -}}
|
||||
{{- end -}}
|
||||
|
||||
<div class="wrap">
|
||||
{{- if lt $now $periodEnd -}}
|
||||
|
||||
{{- $periodStart = $periodStart.UTC -}}
|
||||
{{- $periodEnd = $periodEnd.UTC -}}
|
||||
|
||||
{{- if .Params.link -}}
|
||||
{{- $link := .Params.link -}}
|
||||
{{- if eq $link "latest_release" -}}
|
||||
{{ $link = $latest_release.Permalink -}}
|
||||
{{- end -}}
|
||||
|
||||
<a href="{{ $link }}"
|
||||
class="{{ $kind }}"
|
||||
data-title="{{- .Params.title -}} - {{- $periodStart -}}"
|
||||
data-period-start='{{ div $periodStart.UnixNano 1000000 }}'
|
||||
data-period-end='{{ div $periodEnd.UnixNano 1000000 }}'
|
||||
data-max-impressions="{{ .Params.max_impressions }}"
|
||||
data-timeout="{{ .Params.timeout }}">
|
||||
{{- else -}}
|
||||
<div
|
||||
class="{{ $kind }}"
|
||||
data-title="{{- .Params.title -}} - {{- $periodStart -}}"
|
||||
data-period-start='{{ div $periodStart.UnixNano 1000000 }}'
|
||||
data-period-end='{{ div $periodEnd.UnixNano 1000000 }}'
|
||||
data-max-impressions="{{ .Params.max_impressions }}"
|
||||
data-timeout="{{ .Params.timeout }}">
|
||||
{{- end -}}
|
||||
|
||||
{{- if eq $kind "sticker" -}}
|
||||
<div class="left"></div>
|
||||
<div class="right"></div>
|
||||
|
||||
<div class="wrap">
|
||||
<div class="content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="frame"></div>
|
||||
{{- else -}}
|
||||
<div class="content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="frame"></div>
|
||||
{{- else -}}
|
||||
<div class="content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
<div class="frame"></div>
|
||||
{{- end -}}
|
||||
<div class="frame"></div>
|
||||
{{- end -}}
|
||||
|
||||
{{- if .Params.link -}}
|
||||
</a>
|
||||
{{- else -}}
|
||||
</div>
|
||||
{{- if .Params.link -}}
|
||||
</a>
|
||||
{{- else -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
|
|||
Loading…
Reference in New Issue