我想在配置文件中更改值。我想更改的值为nifi.content.repository. archive.enabled = true to false。
我尝试在清单中添加以下内容:
apiVersion: apps/v1
kind: Deployment
metadata:
name: tests-nifi
namespace: poc
labels:
name : tests-nifi
app : tests-nifi
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: tests-nifi
template:
metadata:
labels:
app: tests-nifi
spec:
restartPolicy: Always
containers:
- name: nifi
image: apache/nifi
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
name: nifi
env:
- name: "NIFI_SENSITIVE_PROPS_KEY"
value: "nificluster"
- name: ALLOW_ANONYMOUS_LOGIN
value: "no"
- name: SINGLE_USER_CREDENTIALS_USERNAME
value: nifi-user
- name: SINGLE_USER_CREDENTIALS_PASSWORD
value: nifi-user-password
- name: NIFI_WEB_HTTP_HOST
value: "0.0.0.0"
- name: NIFI_WEB_HTTP_PORT
value: "8080"
- name: NIFI_ANALYTICS_PREDICT_ENABLED
value: "true"
- name: NIFI_ELECTION_MAX_CANDIDATES
value: "1"
- name: NIFI_ELECTION_MAX_WAIT
value: "20 sec"
- name: NIFI_JVM_HEAP_INIT
value: "2g"
- name: NIFI_JVM_HEAP_MAX
value: "4g"
- name: NIFI_CONTENT_REPOSITORY_ARCHIVE_ENABLED
value: "false"
livenessProbe:
exec:
command:
- pgrep
- java
initialDelaySeconds: 60
periodSeconds: 30
timeoutSeconds: 10
failureThreshold: 3
successThreshold: 1
readinessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 240
periodSeconds: 30
timeoutSeconds: 10
failureThreshold: 3
successThreshold: 1
resources:
requests:
cpu: 2
ephemeral-storage: 2Gi
memory: 4Gi
limits:
cpu: 8
ephemeral-storage: 2Gi
memory: 16Gi
我补充道:
- name: NIFI_CONTENT_REPOSITORY_ARCHIVE_ENABLED
value: "false"
但是当我在pod中执行exec时,值nifi. content. repository. archive. enabled仍然为真。要更改的值在名为"www.example.com"的文件中。nifi.properties".
我怎样才能改变我的yaml中的值呢?
1条答案
按热度按时间5vf7fwbs1#
我并不直接熟悉Apache Nifi,但一些研究表明:
部分资源:
应用更改的最短路径(如果不考虑helm、statefulsets等)是将完整的apache nifi配置复制到ConfigMap中,并将其挂载到部署中--尽管这可能只适合测试,不应用于生产。
仅举一例,并非完整规格: