зеркало из
1
0
Форкнуть 0
Граф коммитов

318 Коммитов

Автор SHA1 Сообщение Дата
Matthew Christopher e8327fcf6e
Disable ASOv1 CI and clarify documentation surrounding it (#4013) 2024-05-16 17:20:58 +00:00
Matthew Christopher 99c4092aed
Fix ADO pipeline auth issues (#3924) 2024-04-08 14:32:56 -07:00
Matthew Christopher b374e47c27
Update Go version (#3890)
This was required as setup-envtest@latest no longer works with Go
versions less than 1.22.

controller-tools was also updated as it panics if 0.13.0 is used with Go
1.22. 0.14.0 must be used instead.

Go version also moved to 1.21 to comply with new mod shape.
2024-03-27 12:33:34 -07:00
Bevan Arps bb37658415
Update branch triggers for ADO (#3448) 2023-10-20 14:48:58 +13:00
Bevan Arps e8350bbe23
Simplification of script (#3441) 2023-10-20 11:25:01 +13:00
Bevan Arps e194915ee5
Merge Queue Support (#3434)
* Remove failed workaround attempt

* Run PR validation automatically for merge queues

* Run AZP automatically for merge queues
2023-10-16 17:15:03 -07:00
dependabot[bot] 00f242735e
Bump sigs.k8s.io/controller-runtime from 0.13.0 to 0.16.2 (#3332)
* Bump sigs.k8s.io/controller-runtime from 0.13.0 to 0.16.2

Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.13.0 to 0.16.2.
- [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases)
- [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md)
- [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.13.0...v0.16.2)

---
updated-dependencies:
- dependency-name: sigs.k8s.io/controller-runtime
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update implementations of webhook.Validator

* Remove references to envtest/printer

* Update for API changes

* Update version of controller-gen

* Update Go version

* Add argument to controller-gen

* Limit manifests to ASO v1

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Bevan Arps <bevan.arps@microsoft.com>
Co-authored-by: Matthew Christopher <matthchr@users.noreply.github.com>
2023-10-13 07:59:12 +13:00
Matthew Christopher ffb88b43a7
Debugging ASOv1 release pipeline (#2957) 2023-05-09 09:18:02 -07:00
Bevan Arps a058e91d27
Fix typo in kustomize command (#2952) 2023-05-08 21:17:14 +00:00
Matthew Christopher 23e7dfa6f1
Force usage of Kustomize v4 for ASOv1 build (#2944)
ubuntu-latest now has Kustomize v5 by default which is what we were using
before (even though we purposefully selected Kustomize v4 in our
installation scripts we weren't actually using it).

This ensures that we use the pinned version of Kustomize.
2023-05-05 10:38:32 -07:00
Matthew Christopher 1a28b67436
Fix ADO job cluster query (#2421)
ARM apperantly now can return Type either in the correct case or
lowercase. This feels like a bug but it's not something they're fixing
anytime soon, so for now we need to work around it.
2022-07-29 10:50:09 -07:00
Matthew Christopher dd4313e03b
Fix ADO build (#2283) 2022-05-16 12:11:24 -07:00
George Pollard 3b3476069a
Update Azure pipeline to use go 1.18 (#2218)
Fixing legacy pipeline.
2022-04-13 15:24:40 +12:00
Matthew Christopher fbe8fe1e43
ASOv1 Helm chart release fixes (#2209) 2022-04-01 13:50:27 -07:00
Matthew Christopher 060893b7ab
Fix ASOv1 CI (#2204) 2022-03-30 12:57:16 -07:00
George Pollard 1f708876c2
master→main (#1918) 2021-10-22 13:21:27 +13:00
Matthew Christopher b3e72934cd
Add new options to support KeyVault soft delete (#1717)
* Update KeyVault SecretClient to recover soft delete

   * Includes a test ensuring that this works
   * Add Azure SQL Combined test to ensure create+delete+recreate works
   * Update CI to not fail on stderr
2021-08-19 16:47:05 -07:00
Christian Muirhead 1def7c58fb
Add operator mode configuration (#1658)
* Add OperatorMode config value and use it from main

It's specified as AZURE_OPERATOR_MODE, with possible values `webhooks`, `watchers` and `watchers-and-webhooks`. Use the setting from main() to decide whether watchers and webhooks should be started.

* Move reconciler and webhook registration out of main

Move it to controllers.RegisterReconcilers and controllers.RegisterWebhooks so that it can be shared between main and the controller tests.

* Test the watchers/webhooks behaviour of different operator modes

* Include operator logging when TEST_EMIT_ASO_LOGS is set

This can be very useful when trying to understand why a test is failing, but it's far too noisy to include all the time.

* Add tests for OperatorMode

* Add make targets and pipeline jobs for webhooks + watchers modes
2021-08-18 01:08:45 +12:00
Christian Muirhead e190674531
Remove envtest job timeout for now (#1723)
* Remove envtest job timeout for now

It seems like there's a problem in the job that's causing it to be killed by the timeout, but the way the job is killed prevents us from seeing the output which would let us fix the underlying problem in whichever test is failing.

* Use require rather than assert in Azure SQL

Also in the Ensure* helpers.

The assert library doesn't stop the current test if the assertion fails, which means that the test run always ends up finishing with a timeout waiting for something that can't happen because some prerequisite failed.

In general the require model is better for tests. The downside is that you might need to run the test multiple times to see all the problems, but it avoids nonsensical situations where you timeout deleting a resource that you failed to create.

* Increase test FailoverGracePeriod to 60

Previous runs were failing with an error saying that 60 is the minimum. (Not sure whether this is a new constraint?)

* Rewrite Retry as a non-recursive function

It was producing very annoying stack traces if a test timed out.
2021-08-17 20:25:42 +12:00
Matthew Christopher f317fde28f
Increase CI timeout (#1673) 2021-08-02 07:57:32 +12:00
Matthew Christopher 02973a1276
Update ASO v1 dependencies (#1646)
* Update Go version to 1.16
* Update dependencies
* Pass ctx to reconcile
2021-07-15 13:20:47 -07:00
Christian Muirhead 76d4bf8a9d
Update aad-pod-identity helm chart dependency to 4.1.1 (#1583)
* Update aad-pod-identity helm chart dependency to 4.1.1

This corresponds to aad-pod-identity version 1.8.0. It's needed
because the previous version 1.5.5 installs v1beta1
ClusterRoleBindings, which trigger deprecation warnings in k8s
1.19.11.

* Use the latest ASO helm chart from index.yaml
2021-06-28 13:23:43 +12:00
Christian Muirhead f347750c70
Temporarily remove stderr check in pipeline clean up task (#1575)
Since the clusters have been upgraded to 1.19.11 the cluster-release
task has started failing since helm is complaining about deprecated
v1beta1 ClusterRoleBindings in aad-pod-identity. Turn off the check so
the pipeline stops failing while we upgrade the aad-pod-identity
dependency.
2021-06-18 16:08:54 +12:00
Christian Muirhead a4d3a51843
Add AZURE_TARGET_NAMESPACES to restrict the namespaces the operator watches (#1559)
* Add a target namespaces config, only watch resources therein

* Initial work on target namespace test

* Get target namespace test working in both cases

* More useful logging when creating test RG fails

* Run the no-target-namespaces test in the CI pipeline

This is handled in the same way as the secret naming version setting,
but the more settings we add (some more are on the way), the more
unwieldy it's going to be. We need to come up with a better way of
making different settings testable.

* Rework install- targets so they don't trample go.mod & .sum

Renamed them to install-tools and install-test-tools, since they're
installing binaries used in the build process rather than code
dependencies.

Run the `go get` commands in a temp directory and dummy module so that
they don't update the ASO go.mod and .sum files with dependencies that
our code doesn't actually depend on.

* Use the unfiltered API reader when looking for AAD identities

When target namespaces are set, there's no guarantee that the
operator's namespace is included. The identity finder always needs to
look in the operator namespace so pass it the API reader which
bypasses the filtered cache.

* Review tweaks, thanks @matthchr!
2021-06-16 08:05:17 -07:00
Matthew Christopher b895cb49b7
Update Helm chart for 1.3.0 (#1512)
* Update Helm chart for 1.3.0

* Update pipeline to error better
2021-05-26 19:58:11 -07:00
Matthew Christopher 771fa82b7d
Fix issue with release scripts (#1509) 2021-05-25 12:15:03 -07:00
Matthew Christopher 78e493ca41
Fix v1 secret naming (#1380)
* Fix v1 secret naming

  - Fix issue where namespace was mistakenly included in v1 secret
    naming key generation. Some resources are not expected to have
    namespace prefix in certain KeyVault scenarios.

* Increase build timeout a bit

* Don't create many different randoms in test

* SecretClient should not be modified

* Change region VM tests are run in

  - Due to capacity constraints. We can move back later.
2021-02-17 12:48:29 -08:00
Matthew Christopher c838a5578f
Improve release process for ASO (#1372)
- Also add some documentation on exactly what the process is.
2021-02-08 17:55:04 -08:00
Matthew Christopher 876b1c7aa4
Fix bugs related to secret management and improve documentation (#1358)
* Fix typo in readme

* Improve secrets documentation

* Return proper error if we cannot deserialize secret

* Add new AZURE_SECRET_NAMING_VERSION mode

The new mode allows us to fix inconsitencies in how secrets
were named without making a breaking change.

  - AppInsights created secrets in the same namespace
    as the resource but with name:
    "appinsights-<resourceGroup>-<resourceName>"
  - Storage created secrets in the same namespace
    as the resource but with name:
    "storage-<resourceGroup>-<resourceName>"
  - AzureSQL resources created resources with
    a different naming scheme as well.
  - Other resources created a secret in the same
    namespace with the secret name being the
    resource name.

The new V2 mode ensures that all resources create secrets
in KeyVault and/or Kubernetes with a consistent naming pattern.

* Update Helm chart (but don't generate new package)

* Fix bug where SQLManagedUser Namespace could be empty

  - This would prevent secrets from being created in Kubernetes

* Enable V2 secrets for EnvTest tests

* Use v1beta1 explicitly with controller-gen

* PR feedback

* PR feedback

* Better testing
2021-02-05 10:05:48 -08:00
Matthew Christopher c446f1d91e
Azure SQL FailoverGroup improvements (#1361)
* Azure SQL FailoverGroup improvements

 - Fix bug preventing reconciliation of updates after a FailoverGroup
   was created.
 - Fix bug where status of long running operation was not properly
   monitored.

* Add unit tests to CI
2021-01-20 13:22:43 -08:00
Matthew Christopher 322e7e8359
Improve validation for AzureSQLUser and AzureSQLManagerUser (#1348)
* Kubebuilder annotation for minlength should use = not :

* Add additional validations on MySQL users

* Add validations to more Azure SQL types

* Update some dependencies

  - We're primarily interested in updating controller-runtime
    as the newer version supports webhooks in envtest better.

* Don't allow DB name "master" to be used for Azure SQL users

* Fixes for CI
2021-01-12 13:37:26 -08:00
Christian Muirhead 9c78bc7673
Update Helm chart to latest released operator version (#1332)
* Update Helm chart

  - Use more best practices for Helm charts as defined here:
    https://helm.sh/docs/chart_best_practices/conventions/
  - Update chart to contain recently added resources.
  - Update chart version to 1.0.0, so that we can begin following semver
    more closely.

* Regenerated helm chart with controller-tools 0.2.5

Co-authored-by: Matthew Christopher <matthchr@users.noreply.github.com>
2020-12-10 15:59:44 +13:00
Kyle Schouviller 139bfba74c
Make aad-pod-identity install optional when using Managed Identity. (#1236)
* Updating chart to make aad-pod-identity installation optional.

* Adding newline to end of Chart.yaml

* Updating chart to make aad-pod-identity installation optional.

* Adding newline to end of Chart.yaml

* Reverting chart version to 0.1.0

Co-authored-by: Kyle Schouviller <kyle0654@hotmail.com>
Co-authored-by: Matthew Christopher <matthchr@users.noreply.github.com>
2020-08-28 15:58:25 -07:00
Matthew Christopher ba2b6c1ef7
Further CI updates (#1217) 2020-07-02 11:24:25 -07:00
jananivMS 02907df904 helm chart update and remove hyphens from image 2020-07-02 10:12:12 -06:00
Matthew Christopher b45c93c68d
Update to azure pipelines file (#1204) 2020-07-01 13:08:47 -07:00
Matthew Christopher ce28fb8f86
Don't run devops pipeline if the only changes are docs changes (#1193)
* Update ADO pipeline to ignore docs changes

* Fix minor nil dereference bug
2020-06-30 11:41:04 -07:00
jananivMS 078ea90f7e make cleanup stage to fail on error 2020-06-11 14:13:11 -06:00
Janani Vasudevan fac16a0acd Remove commented code and cleanup 2020-06-11 14:13:11 -06:00
Janani Vasudevan 9f09aa3482 Cleanup AKS cluster deployment 2020-06-11 14:13:11 -06:00
Janani Vasudevan f76a1bc50c Cleanup stage. fix 2020-06-11 14:13:11 -06:00
Janani Vasudevan 2f55cb4274 Remove commented code 2020-06-11 14:13:11 -06:00
Janani Vasudevan 4481c1bfc7 Fix cleanup stage 2020-06-11 14:13:11 -06:00
Janani Vasudevan 9350400d1a Update azure-pipelines.yml for Azure Pipelines 2020-06-11 14:13:11 -06:00
Janani Vasudevan 432babe3c8 Update azure-pipelines.yml for Azure Pipelines 2020-06-11 14:13:11 -06:00
Claudia Nadolny 7867819380
add support to separate out CRDs in crd folder for helm chart (#1105)
* initial commit

* removed testing values

* removed testing changes

* merged Makefile commands

* updated

* fixed tag

* updated changes

* removed multiple namespaces

* adding CRD install instructions

* updated crds

* fixed path in README

* updated helm chart tar file + docs

* updated helm file with new crds

* Update README.md

* initial commit

* removed testing values

* removed testing changes

* merged Makefile commands

* updated

* fixed tag

* updated changes

* removed multiple namespaces

* adding CRD install instructions

* updated crds

* fixed path in README

* updated helm chart tar file + docs

* updated helm file with new crds

* removed namespace yaml, using helm autocreate

Co-authored-by: William Mortl <32373900+WilliamMortlMicrosoft@users.noreply.github.com>
2020-06-10 17:11:10 -07:00
Janani Vasudevan b99702fb82 Fix Helm chart packaging step 2020-06-08 10:51:05 -06:00
jpflueger 161c6ec8de adding cainjectino validation check to new pipeline 2020-06-02 11:52:52 -06:00
Janani Vasudevan 3bf163f449 Addressed PR comments 2020-05-27 13:50:21 -06:00
Janani Vasudevan f27fa338b3 Addressed PR comments 2020-05-27 13:35:37 -06:00