-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
160 additions
and
13 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
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
This file was deleted.
Oops, something went wrong.
Empty file.
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,11 @@ | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: hx-chat-action-server-data-pvc | ||
spec: | ||
accessModes: | ||
- ReadWriteMany | ||
resources: | ||
requests: | ||
storage: 1Gi | ||
storageClassName: nfs-client |
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: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
namespace: hx-staging-1 | ||
labels: | ||
- pairs: | ||
owner: colin | ||
version: 20241021-v0.0.1 | ||
replicas: | ||
- name: hx-chat-action-server | ||
count: 1 | ||
images: | ||
- name: hx-chat-action-server | ||
newName: nginx | ||
newTag: 1.27.2 | ||
resources: | ||
- ../../base | ||
configMapGenerator: | ||
- name: hx-chat-action-server-configmap | ||
behavior: merge | ||
literals: | ||
- RUST_LOG=DEBUG | ||
patches: | ||
- path: change-pvc.patch.yaml | ||
transformers: | ||
- ./kustomizeconfig/namesuffix-transformer.yaml |
14 changes: 14 additions & 0 deletions
14
hx-kustomize/overlays/staging1/kustomizeconfig/namesuffix-transformer.yaml
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,14 @@ | ||
apiVersion: builtin | ||
kind: PrefixSuffixTransformer | ||
metadata: | ||
name: name-suffix-transformer | ||
suffix: -staging-1 | ||
fieldSpecs: | ||
- path: metadata/name | ||
kind: Deployment | ||
- path: metadata/name | ||
kind: ConfigMap | ||
- path: metadata/name | ||
kind: Service | ||
- path: metadata/name | ||
kind: PersistentVolumeClaim |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
88 changes: 88 additions & 0 deletions
88
jenkins-pipeline/hx-nlp-chat/argocd-declarative/application-hx-staging-1.yaml
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,88 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
# https://argo-cd.readthedocs.io/en/stable/user-guide/application-specification/ | ||
metadata: | ||
name: hx-chat-action-server-staging-1 | ||
# You'll usually want to add your resources to the argocd namespace. | ||
#+ 这里配置为:hx-dev-1,是指把这个声明式的 Application 放到 hx-dev-1 下。 | ||
#+ 相应的kind: AppProject中,需要进行匹配修改 | ||
namespace: hx-dev-1 | ||
# Add this finalizer ONLY if you want these to cascade delete. | ||
finalizers: | ||
# The default behaviour is foreground cascading deletion | ||
- resources-finalizer.argocd.argoproj.io | ||
# Alternatively, you can use background cascading deletion | ||
# - resources-finalizer.argocd.argoproj.io/background | ||
# Add labels to your application object. | ||
labels: | ||
name: hx-chat-action-server-staging-1 | ||
spec: | ||
# The project the application belongs to. | ||
project: hx-chat-project | ||
|
||
# Source of the application manifests | ||
source: | ||
repoURL: ssh://git@iamIPaddr:50022/argocd/hx-kustomize.git # Can point to either a Helm chart repo or a git repo. | ||
targetRevision: main # For Helm, this refers to the chart version. | ||
path: overlays/staging1 # This has no meaning for Helm charts pulled directly from a Helm repo instead of git. | ||
|
||
# Destination cluster and namespace to deploy the application | ||
destination: | ||
# cluster API URL | ||
server: https://kubernetes.default.svc | ||
# or cluster name | ||
# name: in-cluster | ||
# The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace | ||
namespace: hx-staging-1 | ||
|
||
# Extra information to show in the Argo CD Application details tab | ||
info: | ||
- name: '备注:' | ||
value: '测试数据' | ||
|
||
# Sync policy | ||
syncPolicy: | ||
automated: # automated sync by default retries failed attempts 5 times with following delays between attempts ( 5s, 10s, 20s, 40s, 80s ); retry controlled using `retry` field. | ||
prune: true # Specifies if resources should be pruned during auto-syncing ( false by default ). | ||
selfHeal: true # Specifies if partial app sync should be executed when resources are changed only in target Kubernetes cluster and no git change detected ( false by default ). | ||
allowEmpty: false # Allows deleting all application resources during automatic syncing ( false by default ). | ||
syncOptions: # Sync options which modifies sync behavior | ||
- Validate=false # disables resource validation (equivalent to 'kubectl apply --validate=false') ( true by default ). | ||
- CreateNamespace=true # Namespace Auto-Creation ensures that namespace specified as the application destination exists in the destination cluster. | ||
- PrunePropagationPolicy=foreground # Supported policies are background, foreground and orphan. | ||
- PruneLast=true # Allow the ability for resource pruning to happen as a final, implicit wave of a sync operation | ||
- RespectIgnoreDifferences=true # When syncing changes, respect fields ignored by the ignoreDifferences configuration | ||
- ApplyOutOfSyncOnly=true # Only sync out-of-sync resources, rather than applying every object in the application | ||
managedNamespaceMetadata: # Sets the metadata for the application namespace. Only valid if CreateNamespace=true (see above), otherwise it's a no-op. | ||
labels: # The labels to set on the application namespace | ||
who: zhangsan | ||
annotations: # The annotations to set on the application namespace | ||
annotations: demo | ||
|
||
# The retry feature is available since v1.7 | ||
retry: | ||
limit: 5 # number of failed sync attempt retries; unlimited number of attempts if less than 0 | ||
backoff: | ||
duration: 5s # the amount to back off. Default unit is seconds, but could also be a duration (e.g. "2m", "1h") | ||
factor: 2 # a factor to multiply the base duration after each failed retry | ||
maxDuration: 3m # the maximum amount of time allowed for the backoff strategy | ||
|
||
# Will ignore differences between live and desired states during the diff. Note that these configurations are not | ||
# used during the sync process unless the `RespectIgnoreDifferences=true` sync option is enabled. | ||
ignoreDifferences: | ||
# for the specified json pointers | ||
- group: apps | ||
kind: Deployment | ||
jsonPointers: | ||
- /spec/replicas | ||
# for the specified managedFields managers | ||
- group: "*" | ||
kind: "*" | ||
managedFieldsManagers: | ||
- kube-controller-manager | ||
|
||
# RevisionHistoryLimit limits the number of items kept in the application's revision history, which is used for | ||
# informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional | ||
# circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the | ||
# space used to store the history, so we do not recommend increasing it. | ||
revisionHistoryLimit: 10 |
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
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