-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
operator: Add tools to test on Azure (#11340)
)
- Loading branch information
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
readonly account_name="${1-}" | ||
readonly container_name="${2-}" | ||
|
||
if [[ -z "${account_name}" ]]; then | ||
echo "Provide a account name" | ||
exit 1 | ||
fi | ||
|
||
if [[ -z "${container_name}" ]]; then | ||
echo "Provide a container name" | ||
exit 1 | ||
fi | ||
|
||
readonly namespace="${NAMESPACE:-openshift-logging}" | ||
|
||
readonly azure_environment="AzureGlobal" | ||
|
||
resource_group=$(az storage account show --name "${account_name}" | jq -r '.resourceGroup') | ||
readonly resource_group | ||
|
||
account_key=$(az storage account keys list --resource-group "${resource_group}" --account-name "${account_name}" | jq -r '.[0].value') | ||
readonly account_key | ||
|
||
kubectl --ignore-not-found=true -n "${namespace}" delete secret test | ||
kubectl -n "${namespace}" create secret generic test \ | ||
--from-literal=environment="$(echo -n "${azure_environment}")" \ | ||
--from-literal=account_name="$(echo -n "${account_name}")" \ | ||
--from-literal=account_key="$(echo -n "${account_key}")" \ | ||
--from-literal=container="$(echo -n "${container_name}")" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
apiVersion: loki.grafana.com/v1 | ||
kind: LokiStack | ||
metadata: | ||
name: lokistack-dev | ||
namespace: openshift-logging | ||
spec: | ||
size: 1x.demo | ||
storage: | ||
schemas: | ||
- version: v13 | ||
effectiveDate: 2023-10-15 | ||
secret: | ||
name: test | ||
type: azure | ||
storageClassName: managed-csi | ||
tenants: | ||
mode: openshift-logging | ||
rules: | ||
enabled: true | ||
selector: | ||
matchLabels: | ||
openshift.io/cluster-monitoring: "true" | ||
namespaceSelector: | ||
matchLabels: | ||
openshift.io/cluster-monitoring: "true" |