Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: merge dev with feature/1.0.0 #453

Merged
merged 16 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,3 @@

# Some Windows-specific files should always be CRLF
*.bat eol=crlf

**/tests/edge/mq/raw_stats.txt text eol=lf
93 changes: 87 additions & 6 deletions .github/workflows/int_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
strategy:
fail-fast: false
matrix:
feature: [custom-input, default, insecure-listener, syncrules, redeploy]
feature: [custom-input, default, insecure-listener, syncrules, redeploy, trustbundle]
runtime-args:
- ${{ inputs.runtime-init-args != '' || inputs.runtime-create-args != '' }}
exclude:
Expand All @@ -112,6 +112,8 @@ jobs:
runtime-args: true
- feature: redeploy
runtime-args: true
- feature: trustbundle
runtime-args: true
name: "Run cluster tests"
runs-on: ubuntu-22.04
steps:
Expand All @@ -126,9 +128,12 @@ jobs:
echo "CREATE_ARG=--enable-rsync" >> $GITHUB_OUTPUT
elif [[ ${{ matrix.feature }} == "redeploy" ]]; then
echo "REDEPLOY=True" >> $GITHUB_OUTPUT
elif [[ ${{ matrix.feature }} != "default" ]]; then
elif [[ ${{ matrix.feature }} == "custom-input" ]]; then
echo "CREATE_ARG=${{ inputs.runtime-create-args }}" >> $GITHUB_OUTPUT
echo "INIT_ARGS=${{ inputs.runtime-init-args }}" >> $GITHUB_OUTPUT
echo "INIT_ARG=${{ inputs.runtime-init-args }}" >> $GITHUB_OUTPUT
elif [[ ${{ matrix.feature }} == "trustbundle" ]]; then
echo "CREATE_ARG=--trust-settings configMapName=example-bundle configMapKey=trust-bundle.pem issuerKind=Issuer issuerName=selfsigned-issuer " >> $GITHUB_OUTPUT
echo "INIT_ARG=--user-trust true" >> $GITHUB_OUTPUT
fi
- name: "Output variables for future steps"
id: "env_out"
Expand Down Expand Up @@ -161,6 +166,85 @@ jobs:
mkdir ~/.kube 2> /dev/null
sudo k3s kubectl config view --raw > ~/.kube/config
chmod 600 ~/.kube/config
export KUBECONFIG=~/.kube/config
- name: "Apply custom cluster issuer"
if: ${{ matrix.feature == 'trustbundle' || contains(inputs.runtime-init-args, '--user-trust') }}
run: |
set -x
helm repo add jetstack https://charts.jetstack.io --force-update

helm install \
cert-manager jetstack/cert-manager \
--namespace cert-manager \
--create-namespace \
--version v1.13.6 \
--set installCRDs=true \
--set startupapicheck.timeout=5m

kubectl create namespace azure-iot-operations

helm upgrade trust-manager jetstack/trust-manager \
--install \
--namespace cert-manager \
--set app.trust.namespace=cert-manager \
--wait

kubectl apply -f - <<EOF
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: selfsigned-issuer
namespace: cert-manager
spec:
selfSigned: {}
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: trust-manager-example-ca
namespace: cert-manager
spec:
isCA: true
commonName: trust-manager-example-ca
secretName: trust-manager-example-ca-secret
privateKey:
algorithm: ECDSA
size: 256
issuerRef:
name: selfsigned-issuer
kind: Issuer
group: cert-manager.io
EOF

kubectl apply -f - <<EOF
apiVersion: trust.cert-manager.io/v1alpha1
kind: Bundle
metadata:
name: example-bundle
namespace: cert-manager
spec:
sources:
- useDefaultCAs: true
- secret:
name: "trust-manager-example-ca-secret"
key: "tls.crt"
target:
configMap:
key: "trust-bundle.pem"
namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: azure-iot-operations
EOF

kubectl apply -f - <<EOF
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: selfsigned-issuer
namespace: azure-iot-operations
spec:
selfSigned: {}
EOF
- name: "Checkout extension source for build"
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -276,10 +360,7 @@ jobs:
az iot ops check --post
az iot ops check --as-object
az iot ops check --svc broker --resources broker brokerlistener
az iot ops broker stats
az iot ops broker stats --raw
az iot ops asset query -g ${{ env.RESOURCE_GROUP }} --location westus -o table
az iot ops verify-host
- name: "Delete Cluster for redeployment"
if: ${{ matrix.feature == 'redeploy' }}
run: |
Expand Down
3 changes: 1 addition & 2 deletions azext_edge/azext_metadata.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"azext.minCliCoreVersion": "2.53.0",
"azext.isPreview": true
"azext.minCliCoreVersion": "2.53.0"
}
2 changes: 1 addition & 1 deletion azext_edge/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import os

VERSION = "0.8.0b1"
VERSION = "1.0.0"
EXTENSION_NAME = "azure-iot-ops"
EXTENSION_ROOT = os.path.dirname(os.path.abspath(__file__))
USER_AGENT = "IotOperationsCliExtension/{}".format(VERSION)
Loading