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

feat(gitprovider): add Azure DevOps support and update provider confi… #3128

Merged
merged 24 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
ccc05b5
feat(gitprovider): add Azure DevOps support and update provider confi…
diegocaspi Dec 12, 2024
d5f698e
fix(auth): auto attach `offline_access` only if idp supports (#3117)
Marvin9 Dec 11, 2024
cfcf3cf
fix(auth): token renew failure (#3122)
Marvin9 Dec 11, 2024
4561dcf
chore(chart): start using Kubernetes' builtin gRPC probe (#3041)
hiddeco Dec 11, 2024
6b5091c
docs: manual rolebindings for global namespaces (#2934)
fykaa Dec 12, 2024
34cf92a
chore(deps): bump nanoid from 3.3.6 to 3.3.8 in /docs/plugins/gtag (#…
dependabot[bot] Dec 12, 2024
7ab935e
chore(deps): bump nanoid from 3.3.7 to 3.3.8 in /docs (#3132)
dependabot[bot] Dec 12, 2024
da2c137
chore(deps/tools): bump golang.org/x/crypto from 0.30.0 to 0.31.0 in …
dependabot[bot] Dec 12, 2024
3a3b1db
docs: add a resources page for Kargo related talks (#2935)
fykaa Dec 13, 2024
eb7fe22
chore(deps): bump nanoid from 3.3.7 to 3.3.8 in /ui (#3133)
dependabot[bot] Dec 13, 2024
b77cfdf
chore(deps): bump golang.org/x/crypto from 0.30.0 to 0.31.0 (#3131)
dependabot[bot] Dec 13, 2024
3f8d114
docs: Kargo role matrix (#3135)
34fathombelow Dec 13, 2024
e07ab3a
chore(deps): bump the go-minor group with 12 updates (#3146)
dependabot[bot] Dec 16, 2024
874a541
chore(deps): bump curlimages/curl from 8.11.0 to 8.11.1 (#3140)
dependabot[bot] Dec 16, 2024
53552a1
chore(deps): bump actions/setup-go from 5.1.0 to 5.2.0 (#3144)
dependabot[bot] Dec 16, 2024
5092ae3
chore(deps/tools): bump k8s.io/code-generator from 0.31.3 to 0.32.0 i…
dependabot[bot] Dec 16, 2024
b7a58f2
chore(deps): bump the js-minor group in /ui with 26 updates (#3142)
dependabot[bot] Dec 16, 2024
2c5890c
chore(deps): bump the js-patch group across 1 directory with 18 updat…
dependabot[bot] Dec 16, 2024
e8d6f54
fix(controller): git-push step: pull --rebase before push (#3119)
krancour Dec 17, 2024
e4c3daa
feat(ui): PR deep links in Promotion steps and in Promotion lists (#3…
Marvin9 Dec 17, 2024
8e3af16
chore(deps): update go.mod and go.sum to include azure-devops-go-api
diegocaspi Dec 18, 2024
d70d8fc
chore: merge branch 'main' into ado-promotion-steps-support
diegocaspi Dec 18, 2024
0cd3ba9
refactor(azure): update Azure DevOps provider URL handling and improv…
diegocaspi Dec 18, 2024
0a0cba8
chore: ci errors solved
diegocaspi Dec 18, 2024
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: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
echo "Repository is set to: $REPO"
echo "repo=$REPO" >> $GITHUB_OUTPUT
- name: Setup Go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version: '1.23.0'
- name: Set version for unstable builds
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ WORKDIR /kargo/bin
####################################################################################################
# `tools` stage allows us to take the leverage of the parallel build.
# For example, this stage can be cached and re-used when we have to rebuild code base.
FROM curlimages/curl:8.11.0 AS tools
FROM curlimages/curl:8.11.1 AS tools

ARG TARGETOS
ARG TARGETARCH
Expand Down
14 changes: 10 additions & 4 deletions charts/kargo/templates/api/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,24 +87,30 @@ spec:
protocol: TCP
{{- if .Values.api.probes.enabled }}
livenessProbe:
{{- if .Values.api.tls.enabled }}
exec:
command:
- /usr/local/bin/grpc_health_probe
- -addr=:8080
{{- if .Values.api.tls.enabled }}
- -tls
- -tls-no-verify
{{- end }}
{{- else }}
grpc:
port: 8080
{{- end }}
initialDelaySeconds: 10
readinessProbe:
{{- if .Values.api.tls.enabled }}
exec:
command:
- /usr/local/bin/grpc_health_probe
- -addr=:8080
{{- if .Values.api.tls.enabled }}
- -tls
- -tls-no-verify
{{- end }}
{{- else }}
grpc:
port: 8080
{{- end }}
initialDelaySeconds: 5
{{- end }}
{{- if or .Values.kubeconfigSecrets.kargo (and .Values.api.oidc.enabled .Values.api.oidc.dex.enabled) .Values.api.tls.enabled .Values.api.cabundle.configMapName .Values.api.cabundle.secretName }}
Expand Down
52 changes: 45 additions & 7 deletions docs/docs/30-how-to-guides/20-managing-credentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_label: Managing Credentials

# Managing Credentials

To manage the progression of freight from stage to stage, Kargo will often
To manage the progression of Freight from Stage to Stage, Kargo will often
require read/write permissions on private GitOps repositories and read-only
permissions on private container image and/or Helm chart repositories.

Expand Down Expand Up @@ -106,6 +106,50 @@ Refer to
[the advanced section of the installation guide](./10-installing-kargo.md#advanced-installation)
for more details.

:::note
Operators must manually ensure Kargo controllers receive read-only access
to `Secret`s in the designated namespaces. For example, if `kargo-global-creds`
is designated as a global credentials namespace, the following `RoleBinding`
should be created within that `Namespace`:

```yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: kargo-controller-read-secrets
namespace: kargo-global-creds
subjects:
- kind: ServiceAccount
name: kargo-controller
namespace: kargo
roleRef:
kind: ClusterRole
name: kargo-controller-read-secrets
apiGroup: rbac.authorization.k8s.io
```
:::

:::info
By default, Kargo controllers lack cluster-wide permissions on `Secret`
resources. Instead, the Kargo _management controller_ dynamically expands
controller access to `Secret`s on a namespace-by-namespace basis as new
`Project`s are created.

_It is because this process does not account for "global" credential namespaces
that these bindings must be created manually by an operator._
:::

:::warning
Setting `controller.serviceAccount.clusterWideSecretReadingEnabled` setting to
`true` during Kargo installation will grant Kargo controllers cluster-wide read
permission on `Secret` resources.

__This is highly discouraged, especially in sharded environments where this
permission would have the undesirable effect of granting remote Kargo
controllers read permissions on all `Secret`s throughout the Kargo control
plane's cluster -- including `Secret`s having nothing to do with Kargo.__
:::

:::note
Any matching credentials (exact match _or_ pattern match) found in a project's
own `Namespace` take precedence over those found in any global credentials
Expand All @@ -125,12 +169,6 @@ searched in lexical order by name. Only after no exact match _and_ no pattern
match is found in one global credentials `Namespace` does Kargo search the next.
:::

:::caution
It is important to understand the security implications of this feature. Any
credentials stored in a global credentials `Namespace` will be available to
_all_ Kargo projects.
:::

## Managing Credentials with the CLI

The Kargo CLI can be used to manage credentials in a project's `Namespace.`
Expand Down
15 changes: 15 additions & 0 deletions docs/docs/30-how-to-guides/30-managing-user-permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,21 @@ kargo delete role developer --project kargo-demo
role.rbac.kargo.akuity.io/developer deleted
```

## Kargo Role Matrix

The table below outlines the maximum rules required based on the `kargo-admin` ClusterRole. When specifying verbs, it's recommended to apply the principle of least privilege, ensuring access is limited to what is necessary for the specific role.

| **API Groups** | **Resources** | **Verbs** |
|-----------------------------|------------------------------------------------|-----------------------------------------------------|
| `""` | `events`, `namespaces`, `serviceaccounts` | `get`, `list`, `watch` |
| `rbac.authorization.k8s.io` | `rolebindings`, `roles` | `get`, `list`, `watch` |
| `kargo.akuity.io` | `freights`, `projects`, `stages`, `warehouses` | `*` |
| `kargo.akuity.io` | `stages` | `promote` |
| `kargo.akuity.io` | `promotions` | `create`, `delete`, `get`, `list`, `patch`, `watch` |
| `kargo.akuity.io` | `freights/status` | `patch` |
| `argoproj.io` | `analysisruns` | `delete`, `get`, `list`, `watch` |
| `argoproj.io` | `analysistemplates` | `*` |

## Global Mappings

In cases where certain, broad sets of permissions may be required by a large
Expand Down
20 changes: 19 additions & 1 deletion docs/docs/35-references/10-promotion-steps.md
Original file line number Diff line number Diff line change
Expand Up @@ -924,14 +924,32 @@ steps:
### `git-push`

`git-push` pushes the committed changes in a specified working tree to a
specified branch in the remote repository. This step typically follows a `git-commit` step and is often followed by a `git-open-pr` step.
specified branch in the remote repository. This step typically follows a
`git-commit` step and is often followed by a `git-open-pr` step.

This step also implements its own, internal retry logic. If a push fails, with
the cause determined to be the presence of new commits in the remote branch that
are not present in the local branch, the step will attempt to rebase before
retrying the push. Any merge conflict requiring manual resolution will
immediately halt further attempts.

:::info
This step's internal retry logic is helpful in scenarios when concurrent
Promotions to multiple Stages may all write to the same branch of the same
repository.

Because conflicts requiring manual resolution will halt further attempts, it is
recommended to design your Promotion processes such that Promotions to multiple
Stages that write to the same branch do not write to the same files.
:::

#### `git-push` Configuration

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `path` | `string` | Y | Path to a Git working tree containing committed changes. |
| `targetBranch` | `string` | N | The branch to push to in the remote repository. Mutually exclusive with `generateTargetBranch=true`. If neither of these is provided, the target branch will be the same as the branch currently checked out in the working tree. |
| `maxAttempts` | `int32` | N | The maximum number of attempts to make when pushing to the remote repository. Default is 50. |
| `generateTargetBranch` | `boolean` | N | Whether to push to a remote branch named like `kargo/<project>/<stage>/promotion`. If such a branch does not already exist, it will be created. A value of 'true' is mutually exclusive with `targetBranch`. If neither of these is provided, the target branch will be the currently checked out branch. This option is useful when a subsequent promotion step will open a pull request against a Stage-specific branch. In such a case, the generated target branch pushed to by the `git-push` step can later be utilized as the source branch of the pull request. |

#### `git-push` Examples
Expand Down
50 changes: 50 additions & 0 deletions docs/docs/45-resources.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
description: Learn about Kargo through our talks from conferences
sidebar_label: Resources
---

# Resources

Learn more about Kargo through talks and webinars presented at conferences like KubeCon, ArgoCon, GitOpsCon, etc!

## Kargo GA Webinar 🎉
By Kelsey Hightower & Jesse Suen

<center>
<div style={{position: "relative", width: "100%", "padding-top": "56.25%"}}>
<iframe style={{position: "absolute", top: 0, left: 0, width: "100%", height: "100%"}} src="https://www.youtube.com/embed/GvGt0yuApvE?si=UCzHwdzg7R9_mfjJ" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen/>
</div>
</center>

## Streamlining Kubernetes with Kargo
By Christian Hernandez | GitHub OpenSourceFriday 2024

<center>
<div style={{position: "relative", width: "100%", "padding-top": "56.25%"}}>
<iframe style={{position: "absolute", top: 0, left: 0, width: "100%", height: "100%"}} src="https://www.youtube.com/embed/vQ8coBb-3eE?si=26tO8z9-ZoQwbv3N" title="Streamlining Kubernetes with Kargo: #OpenSourceFriday feat. Christian Hernandez" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen/>
</div>
</center>

---

## GitOps Pipelines: Everything Everywhere All at Once
By Christian Hernandez | GitOpsCon North America 2024

<center>
<div style={{position: "relative", width: "100%", "padding-top": "56.25%"}}>
<iframe style={{position: "absolute", top: 0, left: 0, width: "100%", height: "100%"}} src="https://www.youtube.com/embed/ZHGWXISTP68?si=jFdESQ5yXbQn0M3D" title="GitOps Pipelines: Everything Everywhere All at Once - Christian Hernandez" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen/>
</div>
</center>

---

## Multi-Stage Deployment Pipelines the GitOps Way
By Jesse Suen & Kent Rancourt | GitOpsCon Europe 2023

<center>
<div style={{position: "relative", width: "100%", "padding-top": "56.25%"}}>
<iframe style={{position: "absolute", top: 0, left: 0, width: "100%", height: "100%"}} src="https://www.youtube.com/embed/tl8w72tehZ0?si=q-uuzl64JXKyuqH1" title="Multi-Stage Deployment Pipelines the GitOps Way - Jesse Suen & Kent Rancourt" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen/>
</div>
</center>

---
8 changes: 4 additions & 4 deletions docs/plugins/gtag/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions docs/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading