Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitba86b75

Browse files
authored
Add latest updates from Classic (#298)
1 parent88106f0 commitba86b75

File tree

6 files changed

+151
-13
lines changed

6 files changed

+151
-13
lines changed

‎_docs/administration/account-user-management/platform-ip-addresses.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,16 @@ All the IPs are NAT gateways, and need to enable specific IPs instead of ranges.
3838
- 44.228.66.171
3939
- 44.238.167.159
4040
- 44.237.63.217
41+
<!---
42+
- 44.237.63.217
43+
- 52.6.148.44
44+
- 52.73.90.9
45+
- 52.72.0.154
46+
- 52.73.76.60
47+
- 3.228.62.77
48+
- 44.205.132.73
49+
- 34.235.30.144
50+
- 54.160.88.80-->
4151

4252
##Codefresh IPs for Hosted GitOps Runtimes
4353

‎_docs/administration/user-self-management/user-settings.md‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,11 @@ Note that options available highly depend on what Git provider you are using wit
8383
Generate new API keys to access Codefresh functionality from your scripts or applications, outside the Codefresh UI. Edit scopes for existing keys, or revoke them when needed.
8484
For details, see[Codefresh API]({{site.baseurl}}/docs/integrations/codefresh-api/#authentication-instructions).
8585

86-
>Tokens are visible only during creation. You cannot "view" an existing token. To re-enable API access for an existing application, you must delete the old token and create a new one.
86+
>Tokens are visible only during creation. You cannot "view" an existing token. To re-enable API access for an existing application, you must delete the old token and create a new one.
87+
88+
The UI shows the first few characters in the second part of the key, after the`.`, and not the characters at the beginning of the key.
89+
90+
8791

8892

8993
1. In**API Keys**, to generate a new API key, click**Generate**.
@@ -100,6 +104,7 @@ max-width="80%"
100104
%}
101105

102106

107+
103108
##Related articles
104109

105110
<!--why do we need this? this is for admins; also SSO[Add users]({{site.baseurl}}/docs/administration/invite-your-team-member/)-->

‎_docs/integrations/kubernetes.md‎

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,115 @@ echo $(kubectl get secret -n kube-system -o go-template='{{index .data "token" }
374374
{% endraw %}
375375
{% endhighlight %}
376376

377+
####The proper/secure way for Kubernetes Cluster 1.24+
378+
379+
For production environments, create a service account and/or role for Codefresh access.
380+
381+
Codefresh needs these minimum permissions to work with the cluster:
382+
383+
`codefresh-role.yml`
384+
{% highlight yaml %}
385+
{% raw %}
386+
kind: ClusterRole
387+
apiVersion: rbac.authorization.k8s.io/v1
388+
metadata:
389+
name: codefresh-role
390+
rules:
391+
- apiGroups:[“”]
392+
resources:[*]
393+
verbs:[“list”, “watch”, “get”]
394+
{% endraw %}
395+
{% endhighlight %}
396+
397+
Note that these permissions will only allow Codefresh to read the cluster resources and populate the respective dashboards. You need to give more privileges for actual deployments. For more information see the[Kubernetes RBAC documentation page](https://kubernetes.io/docs/reference/access-authn-authz/rbac/){:target="\_blank"}.
398+
399+
Here is an example with role + service account + binding.
400+
401+
`codefresh-role-sa-bind.yml`
402+
{% highlight yaml %}
403+
{% raw %}
404+
kind: ClusterRole
405+
apiVersion: rbac.authorization.k8s.io/v1
406+
metadata:
407+
name: codefresh-role
408+
rules:
409+
- apiGroups:[*]
410+
resources:[*]
411+
verbs:[“get”, “list”, “watch”, “create”, “update”, “patch”, “delete”]
412+
413+
apiVersion: v1
414+
kind: ServiceAccount
415+
metadata:
416+
name: codefresh-user
417+
namespace: kube-system
418+
419+
apiVersion: rbac.authorization.k8s.io/v1
420+
kind: ClusterRoleBinding
421+
metadata:
422+
name: codefresh-user
423+
roleRef:
424+
apiGroup: rbac.authorization.k8s.io
425+
kind: ClusterRole
426+
name: codefresh-role
427+
subjects:
428+
- kind: ServiceAccount
429+
name: codefresh-user
430+
namespace: kube-system
431+
432+
apiVersion: v1
433+
kind: Secret
434+
type: kubernetes.io/service-account-token
435+
metadata:
436+
name: codefresh-user-token
437+
namespace: kube-system
438+
annotations:
439+
kubernetes.io/service-account.name: “codefresh-user”
440+
441+
{% endraw %}
442+
{% endhighlight %}
443+
444+
<br />
445+
446+
1. Select the appropriate cluster if you have more than one:
447+
`Choose cluster`
448+
{% highlight shell %}
449+
{% raw %}
450+
kubectl config use-context <my-cluster-name>
451+
{% endraw %}
452+
{% endhighlight %}
453+
454+
1. Create the Codefresh user/role:
455+
456+
`Apply Codefresh access rules`
457+
{% highlight shell %}
458+
{% raw %}
459+
kubectl apply -f codefresh-role-sa-bind.yml
460+
{% endraw %}
461+
{% endhighlight %}
462+
463+
1. Finally run the following commands, and copy-paste the results to the respective Codefresh field in the UI:
464+
465+
`Host IP`
466+
{% highlight shell %}
467+
{% raw %}
468+
export CURRENT_CONTEXT=$(kubectl config current-context) && export CURRENT_CLUSTER=$(kubectl config view -o go-template=“{{\$curr_context := \”$CURRENT_CONTEXT\” }}{{range .contexts}}{{if eq .name\$curr_context}}{{.context.cluster}}{{end}}{{end}}”) && echo $(kubectl config view -o go-template=“{{\$cluster_context := \”$CURRENT_CLUSTER\”}}{{range .clusters}}{{if eq .name\$cluster_context}}{{.cluster.server}}{{end}}{{end}}”)
469+
{% endraw %}
470+
{% endhighlight %}
471+
472+
`Certificate`
473+
{% highlight shell %}
474+
{% raw %}
475+
echo $(kubectl get secret -n kube-system -o go-template=‘{{index .data “ca.crt” }}’ codefresh-user-token)
476+
{% endraw %}
477+
{% endhighlight %}
478+
479+
`Token`
480+
{% highlight shell %}
481+
{% raw %}
482+
echo $(kubectl get secret -n kube-system -o go-template=‘{{index .data “token” }}’ codefresh-user-token)
483+
{% endraw %}
484+
{% endhighlight %}
485+
377486
####Restrict Codefresh access to a specific namespace
378487

379488
In most cases, you want to allow Codefresh to access all namespaces inside the cluster. This is the most convenient option as it will make

‎_docs/pipelines/monitoring-pipelines.md‎

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -312,36 +312,45 @@ In both cases you can copy to clipboard the yaml shown using the button at the t
312312

313313
###Viewing pipeline metrics
314314

315-
Codefresh offers several metrics for pipelinesteps that allow you to get a better overviewon the resources
315+
Codefresh offers several metrics forthepipeline, and forstepsin the pipeline,that allow you to get a better overviewof the resources
316316
consumed by your pipeline.
317317

318-
At the most basic level Codefresh will show some quick metrics while the pipeline is running that include
318+
**Pipeline metrics**
319+
320+
At the most basic level, Codefresh displays quick metrics while the pipeline is running that include
319321
memory consumed and size of logs:
320322

321323
{% include
322324
image.html
323325
lightbox="true"
324326
file="/images/pipeline/monitoring/quick-pipeline-metrics.png"
325327
url="/images/pipeline/monitoring/quick-pipeline-metrics.png"
326-
alt="Pipelinerunningmetrics"
327-
caption="Pipelinerunningmetrics"
328+
alt="Metrics forrunningpipeline"
329+
caption="Metrics forrunningpipeline"
328330
max-width="70%"
329331
%}
330332

331-
You can then get the memory usage for the whole pipeline by clicking on the metrics tab at the bottom of the screen.
333+
* To view memory and disk usage for running or completed pipeline builds, click the**Metrics** tab at the bottom of the Build page.
334+
335+
* Memory usage: View memory usage (Y-axis) by time (X-axis) for the duration of the build.
336+
* Disk usage: View disk usage (Y-axis) by time (X-axis) for the duration of the build. The red line is set at 90% of the maximum disk space.
337+
To see the precise usage at different points in time, mouse over the dots.
338+
Viewing the actual disk usage for a build during its run allows you to better gauge and define the[minimum disk space required for the build volume]({{site.baseurl}}/docs/pipelines/pipelines/#runtime).
332339

333340
{% include
334341
image.html
335342
lightbox="true"
336343
file="/images/pipeline/monitoring/pipeline-metrics.png"
337344
url="/images/pipeline/monitoring/pipeline-metrics.png"
338-
alt="Pipeline detailedmetrics"
339-
caption="Pipeline detailedmetrics"
345+
alt="Detailedmetrics for pipelines"
346+
caption="Detailedmetrics for pipelines"
340347
max-width="70%"
341348
%}
342349

343350

344-
If you click on an individual step before clicking the*Metrics* tab you will get metrics for that specific step only.
351+
**Pipeline-step metrics**
352+
For step-specific metrics, first select the step, and then click the**Metrics** tab.
353+
Step metrics are available for memory and CPU usage (not disk space).
345354

346355

347356
{% include

‎_docs/pipelines/pipelines.md‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,14 @@ You can define multiple external resources in a single pipeline.
218218
- Medium (recommended 3-4 steps)
219219
- Large (recommended 5-6 steps)
220220

221-
####Set disk space for pipeline builds
222-
Set the disk space you need for the pipeline's build volume. Configuring the disk space per pipeline build volume prevents out-of-space scenarios that lead to failed builds. The disk space set for the pipeline is inherited by all the builds run for the pipeline.
221+
####Set minimum disk space for a pipeline build
222+
To speed up builds and improve performance, Codefresh caches different types of data during pipeline execution for reuse across builds. Image-caching is one example of cached data, where Codefresh pulls the required images during the first build and caches them for reuse in future builds. For more info, see[Pipeline caching]({{site.baseurl}}docs/pipelines/pipeline-caching).
223+
Because a portion of the disk space is already utilized by cache, a build can run out of disk space and fail with the 'no space left on device' error.
223224

224-
Codefresh calculates the available range according tothe disk size, and automatically sets the disk space for the build volume to 70% ofthetotal disk space. You caneitherretain the default allocationorchange as needed.
225+
To prevent out-of-space scenarios that lead tofailed builds, you can set theminimumdisk spaceyou needfor thepipeline'sbuild volume. Definingtheminimum disk space ensures that Codefresh assignseithera cached disk with sufficient disk spaceora new empty disk at the start of the build.
225226

226-
>You can also configure the disk space for a[specific trigger]({{site.baseurl}}/docs/pipelines/triggers/git-triggers/#set-minimum-disk-space-for-build-volume-by-trigger) used by the pipeline or for a specific run, and override what's set for the pipeline.
227+
The disk space set for the pipeline is inherited by all the builds run for the pipeline.
228+
You can also configure the disk space for a[specific trigger]({{site.baseurl}}/docs/pipelines/triggers/git-triggers/#set-minimum-disk-space-for-build-volume-by-trigger) used by the pipeline or for a specific run, and override what's set for the pipeline.
227229

228230
1. Select the pipeline for which to set the disk space.
229231
1. Select**Settings**, and then**Runtime**.
@@ -239,6 +241,8 @@ caption="Set disk space for pipeline builds"
239241
max-width="60%"
240242
%}
241243

244+
>Track the actual disk usage in Builds > Metrics.
245+
242246

243247
##Using Pipeline Templates
244248

‎_docs/pipelines/steps/git-clone.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ step_name:
5555
|`git`| The name of the[git integration]({{site.baseurl}}/docs/integrations/git-providers/) you want to use. If left empty, Codefresh will attempt to use the git provider that was used during account sign-up. Note that this might have unexpected results if you are changing your Git integrations.| Required|
5656
|`repo`| path of the repository without the domain name in the form of`my_username/my_repo`| Required|
5757
|`revision`| The revision of the repository you are checking out. It can be a revision hash or a branch name. The default value is the branch you have specified in your Git provider (e.g`master` or`main`).| Default|
58+
|`depth`| The number of commits to pull from the repo to create a shallow clone. Creating a shallow clone truncates the history to the number of commits specified, instead of pulling the entire history.| Optional|
5859
|`use_proxy`| If set to true the Git clone process will honor`HTTP_PROXY` and`HTTPS_PROXY` variables if present for[working via a proxy](#using-git-behind-a-proxy). Default value is`false`.| Default|
5960
|`credentials`| Credentials to access the repository, if it requires authentication. It can an object containing`username` and`password` fields. Credentials are optional if you are using the[built-in git integrations]({{site.baseurl}}/docs/integrations/git-providers/) .| Optional|
6061
|`fail_fast`| If a step fails and the process is halted. The default value is`true`.| Default|

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp